// 文档 https://github.com/hooke007/MPV_lazy/wiki/4_GLSL


//!PARAM SHARP
//!TYPE DEFINE
//!DESC int
//!MINIMUM 0
//!MAXIMUM 1
0


//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!WIDTH LUMA.w 2 *
//!HEIGHT LUMA.h 2 *
//!COMPONENTS 1
//!BIND LUMA
//!SAVE LANCZOS3
//!DESC [AiUpscale_Fast_2x_Photo_RT] lanczos3

#define FIX(c)		max(abs(c), 1e-5)
#define PI		3.141592653

vec3 weight3(float x)
{
    vec3 s = FIX(2.0 * PI * vec3(x - 1.5, x - 0.5, x + 0.5));
    return sin(s) * sin(s / 3.0) / (s * s);
}

float line_run(float ypos, vec3 xpos1, vec3 xpos2, vec3 linetaps1, vec3 linetaps2)
{
    return float(LUMA_tex(vec2(xpos1.r, ypos))) * linetaps1.r + float(LUMA_tex(vec2(xpos1.g, ypos))) * linetaps2.r + float(LUMA_tex(vec2(xpos1.b, ypos))) * linetaps1.g + float(LUMA_tex(vec2(xpos2.r, ypos))) * linetaps2.g + float(LUMA_tex(vec2(xpos2.g, ypos))) * linetaps1.b + float(LUMA_tex(vec2(xpos2.b, ypos))) * linetaps2.b;
}

vec4 hook()
{
    vec2 pos = LUMA_pos + LUMA_pt * 0.5;
    vec2 f = fract(pos / LUMA_pt);

    vec3 linetaps1 = weight3(0.5 - f.x * 0.5);
    vec3 linetaps2 = weight3(1.0 - f.x * 0.5);
    vec3 columntaps1 = weight3(0.5 - f.y * 0.5);
    vec3 columntaps2 = weight3(1.0 - f.y * 0.5);

    float suml = dot(linetaps1, vec3(1.0)) + dot(linetaps2, vec3(1.0));
    float sumc = dot(columntaps1, vec3(1.0)) + dot(columntaps2, vec3(1.0));
    linetaps1 /= suml;
    linetaps2 /= suml;
    columntaps1 /= sumc;
    columntaps2 /= sumc;

    vec2 xystart = (-2.5 - f) * LUMA_pt + pos;
    vec3 xpos1 = vec3(xystart.x, xystart.x + LUMA_pt.x, xystart.x + LUMA_pt.x * 2.0);
    vec3 xpos2 = vec3(xystart.x + LUMA_pt.x * 3.0, xystart.x + LUMA_pt.x * 4.0, xystart.x + LUMA_pt.x * 5.0);

    return vec4(line_run(xystart.y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.r + line_run(xystart.y + LUMA_pt.y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.r + line_run(xystart.y + LUMA_pt.y * 2.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps1.g + line_run(xystart.y + LUMA_pt.y * 3.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps2.g + line_run(xystart.y + LUMA_pt.y * 4.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b + line_run(xystart.y + LUMA_pt.y * 5.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b, 0, 0, 0);
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE1
//!DESC [AiUpscale_Fast_2x_Photo_RT] feature map 1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.031073844060302,0.088465794920921,-0.161112114787102,0.204165145754814);
res += vec4(-0.020301096141338,-0.056201495230198,-0.104875735938549,-0.018475752323866) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.007001393008977,-0.001930627506226,0.004715670365840,-0.026304800063372) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.012197127565742,0.001837520627305,0.050960943102837,-0.008818422444165) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.034277610480785,0.025639677420259,0.023748122155666,-0.031603217124939) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(0.020653456449509,0.034542433917522,0.031954362988472,0.006643583998084) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.035024419426918,0.111868023872375,0.026607045903802,0.017368873581290) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.036153271794319,-0.032127048820257,0.459639340639114,0.104523792862892) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.130074232816696,0.724624633789063,0.145273059606552,-0.034138541668653) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.147291302680969,-0.159440010786057,-0.061674386262894,0.007206223905087) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.011862965300679,0.110689222812653,-0.068861283361912,0.013772199861705) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.018194779753685,-0.094706930220127,0.301402300596237,0.089075900614262) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.145212501287460,0.364260494709015,0.301900058984756,-0.169319897890091) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(0.639012992382050,-0.771593630313873,-0.792288184165955,-1.699915885925293) * float(LUMA_texOff(vec2(0,0)));
res += vec4(0.497956901788712,-0.124834083020687,-0.013756729662418,0.169025585055351) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.015116335824132,-0.175430610775948,-0.045503899455070,-0.021291175857186) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.022974042221904,0.040367312729359,0.007945087738335,0.017494633793831) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.218003213405609,-0.265414565801620,0.030307851731777,0.135970816016197) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.674659252166748,0.240212947130203,-0.212739780545235,0.046625073999166) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.158124655485153,0.026293581351638,0.022510441020131,0.062691047787666) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.019440311938524,0.034150566905737,0.036216519773006,-0.018126619979739) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.003605345962569,-0.046144355088472,0.010068314149976,-0.046993002295494) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.107597433030605,0.038733735680580,-0.060280721634626,0.057212315499783) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.031460918486118,-0.114438034594059,-0.002152684843168,0.090708494186401) * float(LUMA_texOff(vec2(2,0)));
res += vec4(-0.013204461894929,0.057526156306267,0.047613386064768,0.022802818566561) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.049340661615133,-0.017814842984080,0.001073726685718,-0.003210829105228) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.238331481814384,0.685310184955597,0.049875821918249,-0.035775840282440) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.006807778961957,-0.056942448019981,-0.001831822446547,0.328769594430923);
res += vec4(-0.025422209873796,0.022670151665807,-0.122872985899448,-0.008963299915195) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.057949349284172,-0.017626821994781,0.113957047462463,0.102470070123672) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.060556858778000,-0.174536809325218,0.045302782207727,0.017079856246710) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.040615398436785,-0.037965182214975,-0.205244973301888,-0.013817826285958) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.011475941166282,0.009840994141996,0.110698640346527,-0.008565336465836) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.044053815305233,0.024869211018085,-0.109454900026321,-0.058863017708063) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(-0.465712219476700,-0.092186644673347,0.123747602105141,0.055890418589115) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.440030664205551,0.572663903236389,0.281182557344437,-0.299845576286316) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.056223195046186,-0.189829602837563,-0.340425997972488,-0.065014794468880) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.022349214181304,0.087612412869930,0.084654778242111,0.064949207007885) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(0.029119169339538,-0.219019785523415,0.082401432096958,0.043532840907574) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.597850084304810,0.666895031929016,-0.380939930677414,-0.050788000226021) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(0.610205590724945,-0.710160613059998,-0.328278601169586,-0.716347336769104) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.018071927130222,0.301287263631821,0.023444321006536,-0.194411098957062) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.004095805343240,-0.084064833819866,-0.112480513751507,-0.075541332364082) * float(LUMA_texOff(vec2(0,2)));
res += vec4(-0.042429778724909,-0.027470925822854,-0.144170790910721,0.024017661809921) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(0.084120698273182,-0.033907294273376,0.289849489927292,-0.165310055017471) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.065797701478004,-0.011544785462320,0.475868582725525,-0.438408464193344) * float(LUMA_texOff(vec2(1,0)));
res += vec4(0.032204493880272,0.295984685420990,-0.056632712483406,-0.224227994680405) * float(LUMA_texOff(vec2(1,1)));
res += vec4(-0.015224236994982,0.054646778851748,0.098777234554291,0.003941853996366) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.006991355679929,0.015632420778275,-0.050406910479069,-0.006789896171540) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(-0.021369211375713,0.111235171556473,-0.080285981297493,0.055879469960928) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(0.003875914961100,-0.208125278353691,0.212194785475731,0.043406233191490) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.021782591938972,-0.099393635988235,-0.233775407075882,-0.015715297311544) * float(LUMA_texOff(vec2(2,1)));
res += vec4(0.000481020484585,0.006188648287207,0.024797614663839,0.078416831791401) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(-0.308613896369934,1.015417933464050,0.173395439982414,0.382581591606140) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE2
//!DESC [AiUpscale_Fast_2x_Photo_RT] feature map 2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.135312870144844,-0.383163243532181,0.447677165269852,0.002513612853363);
res += vec4(-0.033187728375196,0.043327819555998,0.011031128466129,0.010287599638104) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.018194414675236,-0.035083778202534,-0.018392562866211,-0.141309037804604) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.112382963299751,-0.025049546733499,-0.004066850524396,0.055657990276814) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.109735578298569,-0.013718475587666,-0.022023411467671,0.095963291823864) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.012147586792707,-0.034033041447401,0.032297130674124,-0.013573775067925) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.097369737923145,-0.013089071959257,-0.044891245663166,0.127236634492874) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(-0.071095891296864,-0.093288272619247,0.042062010616064,0.078953415155411) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.483319014310837,0.008093336597085,0.109785176813602,-0.655692934989929) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.025041675195098,0.049665555357933,0.081110551953316,0.109927885234356) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(-0.013697533868253,0.007374661508948,-0.055711608380079,-0.005871311295778) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(0.004870946519077,-0.056091614067554,0.059857599437237,0.003247421933338) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.015029374510050,0.676464676856995,-0.011334011331201,0.706667482852936) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-1.143898129463196,0.203392222523689,-0.586596608161926,-0.274157226085663) * float(LUMA_texOff(vec2(0,0)));
res += vec4(0.118682511150837,-0.004418355878443,0.046493854373693,-0.112959824502468) * float(LUMA_texOff(vec2(0,1)));
res += vec4(0.031688895076513,0.058154877275229,0.048921033740044,-0.013073019683361) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.026290858164430,-0.013336823321879,0.038439616560936,-0.180995136499405) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(0.111527517437935,0.207148388028145,-0.026964671909809,0.087297558784485) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.219307735562325,0.327144026756287,-0.603448927402496,0.123104438185692) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.063193634152412,-0.072598688304424,-0.033235166221857,-0.036447491496801) * float(LUMA_texOff(vec2(1,1)));
res += vec4(-0.020466161891818,-0.026610523462296,0.021410560235381,0.035498239099979) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.011877352371812,0.060599520802498,-0.035566184669733,0.041743054986000) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.129107519984245,-0.015665540471673,0.048607405275106,-0.026084782555699) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.113107524812222,-0.118427790701389,0.127403169870377,0.016858996823430) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.044932205229998,0.059581760317087,0.088029138743877,-0.041564065963030) * float(LUMA_texOff(vec2(2,1)));
res += vec4(0.032844476401806,-0.007734948303550,-0.054769076406956,0.001705706934445) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.547909736633301,0.935989677906036,-0.244180172681808,-0.784265697002411) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.196683481335640,-0.019405771046877,0.117507383227348,0.019119229167700);
res += vec4(-0.011419119313359,0.036565270274878,-0.040335960686207,-0.007847689092159) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.034654114395380,0.172454744577408,0.221320822834969,-0.042836260050535) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.138423979282379,-0.138156443834305,0.368076622486115,0.104695588350296) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.076583363115788,-0.068957969546318,0.123628512024879,-0.040411282330751) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(0.013812910765409,-0.042849358171225,0.037459354847670,-0.008726092055440) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.037754353135824,-0.004929349757731,-0.071976721286774,0.089153707027435) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(-0.000118619631394,-0.274966835975647,0.289048522710800,0.218878403306007) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.457293570041656,-0.114689439535141,-0.076683320105076,-0.418819367885590) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(0.003984856419265,-0.017042126506567,-0.072359539568424,0.220770522952080) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(-0.031844820827246,0.083282068371773,0.001355867949314,-0.039285231381655) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.075959876179695,-0.049802709370852,-0.044658437371254,0.061737950891256) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.008940373547375,0.622183561325073,0.153079330921173,0.473972588777542) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-1.173713564872742,0.094085030257702,-0.417733758687973,-1.062012910842896) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.088662639260292,-0.508009433746338,-0.141177564859390,0.003486592322588) * float(LUMA_texOff(vec2(0,1)));
res += vec4(0.012289601378143,-0.064281441271305,-0.217645838856697,-0.010087289847434) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.082978516817093,0.070561610162258,0.032886508852243,-0.063783273100853) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(0.031954776495695,-0.174285531044006,-0.048624552786350,0.108740113675594) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.255621492862701,0.502937078475952,-0.239399656653404,0.251022726297379) * float(LUMA_texOff(vec2(1,0)));
res += vec4(0.029745854437351,-0.118326045572758,-0.082348711788654,0.000201498100068) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.070098198950291,0.189180746674538,0.058023381978273,-0.046270959079266) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.048189081251621,0.038530953228474,-0.004189949017018,0.046856980770826) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.018170224502683,0.019325504079461,-0.043300457298756,-0.034347910434008) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(0.001962539972737,-0.069093264639378,0.053310774266720,-0.009034556336701) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.045284628868103,-0.060248740017414,0.027190778404474,-0.017622511833906) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.040497779846191,-0.023511851206422,0.001641933224164,0.039581730961800) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.237177252769470,0.956748425960541,0.925689578056335,-0.178699150681496) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE3
//!DESC [AiUpscale_Fast_2x_Photo_RT] feature map 3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.214396283030510,0.004687491804361,0.053815957158804,0.279844731092453);
res += vec4(-0.041432965546846,0.099926687777042,0.060699105262756,0.087219551205635) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.095765411853790,-0.060481522232294,-0.063496664166451,-0.005765774287283) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.034100268036127,0.043404225260019,0.004926644731313,-0.208916708827019) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.164088100194931,-0.069519795477390,-0.037382736802101,-0.060687303543091) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.007187145296484,0.006682894658297,0.018703790381551,0.044654212892056) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.051834072917700,-0.066659606993198,-0.087151363492012,-0.075491152703762) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.039804439991713,-0.044894158840179,0.112032271921635,0.178563773632050) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(-0.376545429229736,0.191786974668503,0.004310630261898,0.153854653239250) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.095529921352863,0.029382575303316,0.064129054546356,-0.032137647271156) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.014347303658724,-0.071475632488728,-0.022224653512239,-0.021595356985927) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.030433580279350,0.147732004523277,0.031827066093683,-0.028477011248469) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(0.079594388604164,-0.218890175223351,-0.145612835884094,0.118258818984032) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-0.837572336196899,0.465670198202133,-0.380090117454529,-0.974353969097137) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.080885909497738,-0.433761686086655,-0.468547224998474,0.298279523849487) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.007382117677480,0.211841493844986,-0.032122671604156,0.038399327546358) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.101145789027214,-0.265720754861832,-0.007072025910020,-0.077728614211082) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.231326550245285,-0.146684587001801,0.129667937755585,-0.015537264756858) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(0.577873945236206,-0.105397857725620,0.401342153549194,0.109940521419048) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.086237087845802,0.171141818165779,0.263738423585892,0.133562609553337) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.085538707673550,0.129835993051529,0.112970784306526,0.004658356774598) * float(LUMA_texOff(vec2(1,2)));
res += vec4(0.041624899953604,0.064027361571789,0.003735281527042,0.055660497397184) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.073561795055866,0.055213861167431,-0.032774377614260,-0.095800608396530) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.165847733616829,-0.037842027842999,0.141896411776543,-0.175160616636276) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.072732597589493,-0.145580455660820,-0.057660773396492,-0.069482065737247) * float(LUMA_texOff(vec2(2,1)));
res += vec4(0.006568311713636,0.102737009525299,-0.020386693999171,0.071077167987823) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.369862884283066,0.870392680168152,-0.545190274715424,0.993521571159363) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.048069998621941,0.045956298708916,0.073306314647198,0.479518800973892);
res += vec4(-0.023922944441438,-0.039256017655134,0.037209481000900,-0.029914811253548) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(-0.025613619014621,0.199228510260582,-0.069875143468380,0.059644520282745) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.110100269317627,-0.192814782261848,0.217323094606400,-0.071914941072464) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.159636527299881,0.015602083876729,-0.119876191020012,0.022660912945867) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.055516641587019,-0.011462230235338,0.030292812734842,0.011264060623944) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.148728594183922,-0.015631152316928,0.147342443466187,0.015327163040638) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.143672063946724,-0.294383227825165,-0.113418921828270,0.030658686533570) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.157949700951576,0.486794412136078,0.546726047992706,0.048071984201670) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.615071594715118,-0.272269248962402,0.237075954675674,0.035516075789928) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.074296928942204,0.123716302216053,0.017654329538345,0.026522902771831) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.211858689785004,0.129049658775330,-0.082927495241165,-0.027564726769924) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.084789119660854,-0.320097416639328,-0.220644474029541,-0.171301826834679) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-0.496866852045059,0.216102868318558,-0.696738183498383,-1.184619665145874) * float(LUMA_texOff(vec2(0,0)));
res += vec4(0.614726483821869,-0.418200820684433,-0.041004601866007,0.151498898863792) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.061182584613562,0.365494668483734,-0.089975170791149,-0.055688735097647) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.075959704816341,-0.036902058869600,-0.053184077143669,0.005445741582662) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.073628552258015,0.044994197785854,0.208024203777313,0.055466067045927) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(0.499846577644348,-0.036909852176905,0.040696978569031,-0.002698349067941) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.252654761075974,-0.015926396474242,-0.049315091222525,0.101807452738285) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.027200106531382,0.060280147939920,0.042909029871225,-0.046409703791142) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.026013653725386,0.037564378231764,0.009600481949747,0.015307537280023) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.010608936659992,-0.072053410112858,0.011035682633519,-0.010873967781663) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.156001523137093,0.000714875699487,0.047741994261742,0.031396444886923) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.172256648540497,-0.011737566441298,-0.062235433608294,-0.035044655203819) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.083351582288742,0.042558524757624,0.014905286021531,0.024538563564420) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.776118874549866,0.276575744152069,0.596931159496307,0.124651946127415) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL1
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 1_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.193862214684486,-0.237447425723076,0.106804303824902,0.007574867457151);
res += mat4(0.104630678892136,0.046040039509535,0.001081465743482,-0.002217655302957,0.075788922607899,0.113669559359550,0.122427120804787,0.040223512798548,-0.096111513674259,0.006340106483549,0.120530642569065,0.056256972253323,0.025463955476880,-0.125255420804024,0.090329520404339,-0.039359595626593) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.004033772274852,-0.036516875028610,0.233470961451530,0.093858741223812,-0.047189064323902,0.112385176122189,-0.159155264496803,-0.023236051201820,-0.158038303256035,-0.043914675712585,-0.036558382213116,-0.063602551817894,0.088063336908817,-0.240939170122147,-0.137246131896973,-0.039559967815876) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.067940652370453,0.272041410207748,-0.046069495379925,0.043936464935541,0.162151873111725,-0.061069864779711,-0.045547343790531,0.089090891182423,-0.030425967648625,0.072194479405880,0.028986299410462,0.021930150687695,0.079958423972130,-0.181495457887650,-0.052774854004383,0.068782463669777) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.094024248421192,0.252678036689758,-0.097055628895760,0.075221784412861,0.098348230123520,-0.204755127429962,-0.091987624764442,0.165700644254684,0.085256054997444,0.111411377787590,0.119368165731430,-0.128213509917259,-0.022148642688990,0.069680936634541,0.060376606881618,0.642128050327301) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.181641012430191,-0.145241439342499,0.236881867051125,-0.127155214548111,-0.133033901453018,0.129945859313011,0.153154268860817,-0.218895256519318,-0.002999913180247,-0.156206011772156,0.023326063528657,-0.003202032763511,0.300735414028168,0.202181726694107,0.052891630679369,-0.559764206409454) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.013062166050076,0.230739012360573,-0.455716580152512,0.051888890564442,0.208457961678505,-0.201372101902962,-0.115328080952168,0.061148762702942,0.080458328127861,-0.044267736375332,-0.113692097365856,-0.226544603705406,0.071462363004684,0.213965937495232,-0.218498736619949,-0.178682073950768) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.078231140971184,0.323896080255508,-0.024547919631004,-0.052322428673506,-0.230770438909531,-0.017475740984082,0.288870513439178,-0.102753929793835,-0.075753070414066,0.059520833194256,-0.069307573139668,0.088296569883823,-0.229515269398689,0.139585480093956,-0.011911973357201,0.039846859872341) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.067544773221016,-0.125144973397255,0.046883646398783,-0.029547108337283,-0.220846727490425,0.034269895404577,-0.146019130945206,-0.057965978980064,0.162715733051300,0.092732034623623,0.086959250271320,0.002105505205691,0.230687603354454,-0.015923852100968,-0.046699430793524,-0.075481802225113) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.003813903778791,0.161282211542130,-0.099819444119930,-0.028941154479980,0.441113412380219,0.002543342066929,0.074585884809494,-0.057266227900982,-0.257943063974380,0.031538236886263,0.069477565586567,-0.117501728236675,-0.060207765549421,-0.020601561293006,0.072358407080173,-0.089589267969131) * FEATURE1_texOff(vec2(1,1));
res += mat4(0.140251323580742,0.129891976714134,0.036240726709366,0.221196398139000,-0.004826190415770,-0.154180750250816,-0.085761941969395,-0.227027401328087,-0.135733842849731,-0.199734747409821,0.027610393241048,0.110552109777927,-0.080583378672600,-0.189791604876518,-0.195976540446281,-0.027696954086423) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(0.050306677818298,-0.085273362696171,-0.389192461967468,-0.219857841730118,0.060255948454142,-0.023690566420555,0.012822011485696,-0.018284589052200,0.210174679756165,0.016218727454543,-0.032330051064491,-0.333214998245239,0.043634153902531,-0.127787783741951,-0.151888832449913,-0.119806796312332) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.006968395318836,-0.060257114470005,-0.060317870229483,-0.082045622169971,0.059115815907717,0.029931435361505,0.060277819633484,-0.063827440142632,0.082453966140747,-0.139574125409126,-0.091834269464016,-0.049341596662998,0.105019696056843,-0.024459498003125,-0.040156301110983,0.083640910685062) * FEATURE2_texOff(vec2(-1,1));
res += mat4(-0.002402839250863,-0.043724890798330,-0.229775771498680,0.579304993152618,-0.315822780132294,0.123582042753696,-0.142025664448738,-0.060143295675516,0.038325533270836,-0.051180586218834,0.100505784153938,0.159936711192131,0.058975465595722,0.210666716098785,-0.155378267168999,-0.070462293922901) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.248075127601624,0.607540845870972,0.077515691518784,-0.284457921981812,0.450072705745697,-0.135308980941772,0.156408742070198,-0.304471909999847,0.103472448885441,0.472578436136246,0.243590906262398,-0.433321326971054,-0.061735633760691,-0.055787116289139,-0.321910530328751,-0.372188091278076) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.054982684552670,0.094641275703907,-0.139575824141502,-0.034496903419495,0.332651644945145,-0.380039691925049,-0.239775359630585,-0.112077884376049,0.133249461650848,-0.086582563817501,-0.188150554895401,-0.059893559664488,0.128589943051338,-0.273980915546417,-0.231728345155716,0.107215501368046) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.306737601757050,0.104755401611328,0.200111418962479,-0.229836508631706,-0.061386220157146,-0.053508277982473,-0.103553719818592,0.083955682814121,0.048608116805553,-0.015286960639060,-0.138043731451035,-0.011185498908162,0.111276403069496,0.098129652440548,-0.249826684594154,-0.145783796906471) * FEATURE2_texOff(vec2(1,-1));
res += mat4(-0.025091677904129,-0.186168774962425,-0.049096114933491,-0.015275441110134,-0.053698614239693,0.042115040123463,-0.046886336058378,-0.028029723092914,-0.064492307603359,-0.259375989437103,-0.077523633837700,0.070458307862282,0.290220737457275,-0.258901834487915,-0.221908003091812,0.030298827216029) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.003410669509321,0.114125467836857,-0.070243336260319,-0.250594645738602,0.037655051797628,-0.245634213089943,-0.143275976181030,0.055136777460575,-0.121331416070461,-0.074675910174847,0.108015350997448,0.126293152570724,0.022690186277032,-0.086764864623547,-0.189736798405647,0.123836204409599) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.187763050198555,-0.045115094631910,0.153922379016876,-0.396789103746414,0.014052418060601,-0.070414580404758,-0.256071537733078,0.127885684370995,0.000309677561745,0.147559702396393,0.137539252638817,0.188233420252800,0.075466707348824,0.128740966320038,-0.068654343485832,-0.034639902412891) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(-0.023489560931921,0.051159542053938,-0.143910065293312,0.249329358339310,0.071822568774223,-0.082054972648621,0.246389135718346,0.224501118063927,0.155963316559792,0.324535071849823,0.227223545312881,-0.148727267980576,-0.033043179661036,-0.083199694752693,-0.049426276236773,0.095216922461987) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.031145477667451,0.136752128601074,-0.124008677899837,-0.102569304406643,-0.236454710364342,-0.079267717897892,-0.063399024307728,-0.019800508394837,0.085238948464394,-0.006859572138637,-0.187861248850822,0.004787821322680,-0.011347335763276,-0.091415710747242,0.017619609832764,0.052427332848310) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.069350525736809,-0.032170247286558,-0.046483334153891,0.253970086574554,-0.136835768818855,0.121031686663628,0.362940102815628,-0.280670046806335,0.079418838024139,0.356865972280502,0.071295395493507,-0.124442242085934,0.244918510317802,-0.224391743540764,-0.316896110773087,0.721966981887817) * FEATURE3_texOff(vec2(0,-1));
res += mat4(0.418478786945343,0.225468754768372,-0.029575645923615,-0.250065118074417,0.092179484665394,-0.083919122815132,-0.051630552858114,-0.004812675993890,0.037430647760630,0.172386437654495,0.065277598798275,0.064661994576454,-0.358633220195770,0.354115307331085,0.279096215963364,-0.259067445993423) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.079319931566715,0.119528427720070,-0.129469439387321,-0.070036880671978,-0.038395397365093,0.190729796886444,0.210658818483353,-0.066535972058773,0.002525740070269,0.211777180433273,0.037980839610100,-0.055912017822266,0.209802150726318,-0.102260939776897,-0.144378200173378,0.029977176338434) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.148706614971161,0.002914950018749,0.005109963938594,0.136436447501183,-0.107709370553493,0.081270650029182,-0.084542348980904,0.099968515336514,-0.023414334282279,-0.014542019926012,0.030192783102393,0.101407513022423,0.306625574827194,-0.032243903726339,-0.153395280241966,-0.081200629472733) * FEATURE3_texOff(vec2(1,-1));
res += mat4(-0.115317560732365,0.189126119017601,-0.090814657509327,-0.026031669229269,0.101471751928329,-0.051388036459684,-0.102473467588425,-0.088955484330654,-0.105245843529701,0.149099633097649,-0.164600133895874,-0.081748016178608,-0.400088727474213,-0.053059495985508,-0.155909225344658,-0.094644159078598) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.004873773083091,-0.047966297715902,-0.339750677347183,0.068666867911816,0.096796147525311,-0.032493904232979,-0.098446764051914,0.063988924026489,-0.052890691906214,0.061126902699471,0.105050086975098,0.052411634474993,0.183613166213036,-0.049564275890589,0.096251294016838,0.030515663325787) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.730816662311554,0.338935106992722,0.729819536209106,0.203783974051476) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.190370142459869,0.019951663911343,-0.070996411144733,0.036828309297562);
res += mat4(-0.021238211542368,0.121843859553337,-0.134648680686951,0.135574489831924,0.017460489645600,0.320927858352661,0.040916047990322,0.063192680478096,-0.055178534239531,-0.216911807656288,-0.078928537666798,-0.161250606179237,-0.211676865816116,0.028693633154035,0.088217198848724,0.231598228216171) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.142294988036156,0.066891334950924,0.046880465000868,-0.078839845955372,-0.236427798867226,-0.073559746146202,-0.054119579493999,0.124301917850971,0.029880845919251,0.042049512267113,0.177186295390129,-0.055748164653778,-0.154029771685600,-0.015528036281466,0.039967589080334,-0.057935979217291) * FEATURE1_texOff(vec2(-1,0));
res += mat4(-0.170619711279869,0.068337544798851,0.083983711898327,0.136478319764137,0.043978337198496,0.058669582009315,-0.108145572245121,0.018747868016362,0.106626994907856,0.054654512554407,0.012397940270603,-0.011193299666047,-0.053086403757334,0.062013547867537,-0.033935382962227,0.057119179517031) * FEATURE1_texOff(vec2(-1,1));
res += mat4(-0.000410466978792,-0.607796728610992,-0.102471791207790,-0.305485397577286,0.113190278410912,0.667532086372375,-0.228736758232117,0.572066009044647,0.029576145112514,-0.235246688127518,0.198514491319656,0.038408741354942,-0.123514525592327,0.115644715726376,-0.212526008486748,0.382126748561859) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.236675247550011,0.088601134717464,-0.173983246088028,0.048676364123821,-0.332542896270752,-0.382426023483276,0.210610046982765,-0.140001833438873,-0.156349316239357,0.027301112189889,-0.155084803700447,0.113993778824806,-0.351273626089096,-0.085066318511963,0.078588813543320,0.054872106760740) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.335017293691635,0.157828256487846,0.199402987957001,0.227262437343597,0.403290718793869,-0.139839053153992,-0.263341277837753,0.117136225104332,0.048691961914301,0.058017536997795,-0.062858298420906,-0.001563645550050,-0.096214368939400,0.031046768650413,-0.113736502826214,-0.005615182686597) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.108090549707413,0.240618839859962,-0.058029245585203,-0.063307985663414,-0.027460487559438,-0.225656762719154,0.133412629365921,-0.341827839612961,-0.088706262409687,-0.068842358887196,-0.280986040830612,-0.257540136575699,-0.134427770972252,-0.192475840449333,-0.039835713803768,0.040863841772079) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.292645096778870,0.120916806161404,-0.208389922976494,0.051067631691694,0.177240535616875,0.119235366582870,-0.091441377997398,0.104954332113266,-0.075622037053108,-0.052116040140390,-0.283730387687683,-0.153515711426735,-0.141891285777092,0.036007255315781,-0.098594129085541,-0.182541504502296) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.398550093173981,0.102948792278767,0.138868242502213,0.116227641701698,-0.011985098943114,0.034781087189913,0.148301124572754,-0.051101062446833,-0.016696158796549,0.067587710916996,-0.041423805058002,0.097096219658852,-0.101910412311554,0.101371444761753,0.041744541376829,0.076407179236412) * FEATURE1_texOff(vec2(1,1));
res += mat4(0.154844865202904,0.101238355040550,-0.000834772305097,0.640130162239075,-0.114709839224815,0.198404043912888,0.147495925426483,-0.210708528757095,-0.083281487226486,0.040539845824242,-0.166985809803009,0.052160155028105,-0.066164530813694,-0.004563992377371,0.112922504544258,-0.145826235413551) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.176645770668983,-0.104862719774246,-0.106275513768196,-0.167055234313011,0.265384912490845,0.069885589182377,0.178374305367470,0.212277024984360,-0.095679461956024,0.121362015604973,-0.234922736883163,0.065702632069588,-0.000632589508314,0.079505681991577,0.216798901557922,-0.289594113826752) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.078788958489895,-0.112435646355152,-0.019459867849946,-0.245245784521103,-0.027279857546091,0.048290472477674,0.072608001530170,-0.003289384068921,0.046312566846609,-0.006850028410554,0.140444606542587,0.015466221608222,0.049046393483877,0.011441593058407,0.086772859096527,-0.277381032705307) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.010828210972250,-0.017996212467551,-0.211058124899864,0.439985632896423,-0.412357419729233,0.539651632308960,-0.373953759670258,-0.024174246937037,-0.074629835784435,0.283397316932678,0.006308185402304,-0.012474929913878,0.113619305193424,-0.667746424674988,0.273384183645248,0.154372945427895) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.117360994219780,0.030531942844391,0.020596899092197,-0.242864772677422,0.354763805866241,-0.244228810071945,0.470409750938416,-0.238225862383842,-0.347163766622543,-0.243152022361755,-0.005409732926637,-0.254477411508560,0.163943275809288,0.093632057309151,-0.135099396109581,-0.569691240787506) * FEATURE2_texOff(vec2(0,0));
res += mat4(-0.088596262037754,0.015884255990386,-0.034489423036575,-0.049253892153502,0.215132459998131,-0.038041558116674,-0.263706088066101,0.064556285738945,0.484346479177475,0.133182123303413,0.045518487691879,0.086851783096790,0.100168451666832,-0.091956138610840,0.028375282883644,-0.256947606801987) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.078626915812492,-0.057377588003874,0.026230189949274,-0.218167021870613,-0.037410039454699,0.098844982683659,-0.183026507496834,0.027715949341655,0.005276101175696,0.135436803102493,0.003306762082502,0.034661404788494,0.042415145784616,-0.058026783168316,-0.072801433503628,-0.045852988958359) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.033899210393429,0.062027361243963,-0.281795889139175,-0.122053615748882,-0.244517639279366,-0.127626165747643,-0.124489784240723,0.276642262935638,0.089098051190376,-0.356841772794724,0.149667814373970,-0.112273104488850,0.091747865080833,0.180301651358604,-0.136215820908546,-0.440532267093658) * FEATURE2_texOff(vec2(1,0));
res += mat4(0.107971787452698,0.122098222374916,-0.086737193167210,-0.218289718031883,0.042337480932474,-0.122991494834423,0.000244806316914,0.031218649819493,0.013866342604160,0.043111089617014,0.163963109254837,0.036349873989820,0.179952353239059,0.083225965499878,-0.121795006096363,-0.299524784088135) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.102581761777401,-0.182066485285759,0.114773578941822,-0.235138878226280,-0.011755425482988,-0.070845082402229,0.061711777001619,0.132226601243019,0.020122945308685,0.109719231724739,0.036970656365156,0.093414783477783,-0.093333289027214,0.186026617884636,0.077582679688931,0.255300045013428) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.260351777076721,-0.084076829254627,0.183784589171410,-0.098432026803493,0.049260642379522,0.129245787858963,0.029720783233643,-0.097889050841331,0.372411340475082,-0.192975416779518,0.388736218214035,-0.172706142067909,-0.093680299818516,-0.111534468829632,0.008409430272877,-0.336610347032547) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.054262798279524,0.007297941949219,0.229836732149124,0.105603791773319,0.055802833288908,-0.049431398510933,-0.032105341553688,-0.051089085638523,-0.122460417449474,-0.058440480381250,0.105310387909412,0.074248202145100,0.161274880170822,-0.037619687616825,0.034028016030788,-0.004143660888076) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.237764194607735,0.094625458121300,-0.516048312187195,0.313273400068283,-0.023155128583312,-0.473755687475204,0.012322343885899,0.023858489468694,-0.174986183643341,-0.111656360328197,-0.197558283805847,0.193968519568443,0.066204421222210,0.218361064791679,0.128277942538261,0.482211738824844) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.518478155136108,-0.169154226779938,-0.147144958376884,0.009722551330924,0.261712223291397,0.165382310748100,-0.201878607273102,0.203540176153183,-0.382510334253311,0.070126935839653,-0.114102967083454,0.078481338918209,0.130026504397392,-0.124254152178764,0.178265139460564,-0.520838201045990) * FEATURE3_texOff(vec2(0,0));
res += mat4(0.054571464657784,-0.043170385062695,-0.073604501783848,-0.027540724724531,-0.299439787864685,-0.066509418189526,0.461398273706436,-0.020729789510369,-0.144747540354729,0.029507670551538,-0.151501759886742,0.025445843115449,0.082879096269608,-0.024527614936233,-0.133350864052773,-0.016553366556764) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.027158217504621,0.076918125152588,0.197414681315422,0.082235842943192,0.114341348409653,-0.116688191890717,-0.100198470056057,0.080541849136353,-0.029890397563577,-0.109068013727665,-0.096836797893047,-0.150738224387169,0.015434471890330,0.003542624879628,0.015448279678822,-0.092530764639378) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.106649011373520,0.158836677670479,0.040980596095324,-0.070744954049587,0.111694417893887,0.083595439791679,-0.172998711466789,-0.032159876078367,0.325781017541885,0.184353783726692,-0.187314346432686,-0.122278653085232,0.045332841575146,-0.017041362822056,-0.324368298053741,0.060589935630560) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.032702866941690,-0.114315263926983,0.028943939134479,-0.075535960495472,-0.038117483258247,0.095169462263584,-0.014521745964885,0.009799062274396,0.175024658441544,-0.014860628172755,-0.087873794138432,-0.073474630713463,0.037135679274797,-0.042600415647030,-0.113676957786083,0.136288300156593) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.872481107711792,-0.213714107871056,0.737118661403656,-0.015959633514285) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL2
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 1_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.007340284995735,0.010154766961932,0.032321356236935,0.155654549598694);
res += mat4(-0.029779188334942,-0.003529834793881,0.120886467397213,-0.019010556861758,-0.136807203292847,-0.422702133655548,0.014412952587008,-0.189709261059761,-0.020067611709237,0.369807928800583,-0.001660495763645,0.001357671455480,-0.075244478881359,0.084187410771847,-0.070027247071266,-0.276202261447906) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.141757875680923,0.381181389093399,-0.044615127146244,0.186213463544846,0.330695986747742,0.154969081282616,-0.235217168927193,-0.126608297228813,-0.215295791625977,-0.217062279582024,0.017165109515190,0.108036458492279,0.049540389329195,-0.120534576475620,-0.109723851084709,-0.349061399698257) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.143572643399239,-0.220740243792534,-0.056324880570173,0.173985451459885,0.014199698343873,0.366959273815155,-0.007229545153677,0.062242701649666,0.103141084313393,-0.355546623468399,0.006120071280748,-0.211127147078514,0.014096449129283,0.183893069624901,-0.187465175986290,-0.173307016491890) * FEATURE1_texOff(vec2(-1,1));
res += mat4(-0.113818608224392,-0.018581368029118,-0.129635855555534,-0.171479910612106,0.297913342714310,0.162339836359024,0.165935114026070,0.094820812344551,-0.186393350362778,-0.078730545938015,0.007521136663854,0.041340153664351,-0.053806435316801,-0.045862164348364,0.051568623632193,-0.102221004664898) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.059552852064371,-0.019983338192105,-0.809764385223389,-0.133658409118652,-0.484427213668823,0.390876531600952,0.323073446750641,-0.072885699570179,-0.146066471934319,-0.219653412699699,-0.018884735181928,0.223749309778214,0.028482338413596,0.010220918804407,0.515647768974304,0.024090630933642) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.032101813703775,-0.026711227372289,0.114741817116737,-0.035163532942533,-0.106749646365643,-0.069150179624557,-0.214718177914619,-0.178072690963745,-0.148079767823219,0.104416981339455,0.291071951389313,-0.218134194612503,-0.242164239287376,-0.003854713635519,0.048468302935362,-0.166356682777405) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.150446742773056,0.008259121328592,0.074252575635910,0.113473132252693,0.033202599734068,0.243479281663895,-0.112931840121746,-0.396708637475967,-0.089687556028366,-0.141409605741501,0.034661855548620,0.156987383961678,-0.014271627180278,0.174388408660889,-0.008104062639177,-0.116547763347626) * FEATURE1_texOff(vec2(1,-1));
res += mat4(0.074584566056728,0.014937628060579,-0.066526122391224,-0.162354826927185,0.426325678825378,0.042604997754097,-0.477350056171417,-0.176772341132164,-0.021415388211608,-0.096469558775425,-0.054627403616905,-0.071419537067413,-0.123918324708939,-0.030474251136184,-0.060680292546749,0.365875393152237) * FEATURE1_texOff(vec2(1,0));
res += mat4(0.015530123375356,0.065898537635803,0.055423777550459,0.114451691508293,-0.060791235417128,-0.352979123592377,0.403617173433304,0.158434286713600,-0.118549793958664,0.408874392509460,-0.047451652586460,-0.074922956526279,-0.033938229084015,-0.200279608368874,0.008119547739625,0.040223792195320) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.209606468677521,-0.171760171651840,0.140059366822243,0.026131365448236,0.063267461955547,-0.051398023962975,-0.010709463618696,0.035748425871134,0.105202533304691,0.128361389040947,-0.058114282786846,-0.059468105435371,0.053821098059416,-0.046834055334330,-0.053321458399296,0.015967613086104) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.011364591307938,-0.248551741242409,0.248700827360153,0.221584394574165,-0.026605531573296,0.167154967784882,-0.110642112791538,-0.187472924590111,-0.131488427519798,-0.048080675303936,0.249181091785431,-0.181790664792061,0.090310484170914,-0.092887014150620,0.053124215453863,-0.128437936306000) * FEATURE2_texOff(vec2(-1,0));
res += mat4(-0.123486809432507,0.072668425738811,-0.053717169910669,-0.139469325542450,-0.180109784007072,0.036116626113653,0.148068815469742,-0.222822263836861,0.034602869302034,0.041866596788168,0.017210969701409,0.083673559129238,0.051685068756342,-0.082351088523865,-0.036785278469324,-0.136907443404198) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.197170794010162,-0.096089504659176,-0.040516968816519,-0.245451763272285,0.036968041211367,0.029697565361857,-0.029587434604764,-0.282109260559082,0.154397457838058,-0.023457786068320,-0.096442423760891,0.112104117870331,0.118765152990818,-0.101333253085613,0.027905590832233,0.043250259011984) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.358547478914261,0.405193626880646,0.059318311512470,-0.249639675021172,-0.218605160713196,-0.097329445183277,-0.101483106613159,0.203262805938721,0.071492545306683,-0.042297456413507,-0.243311136960983,0.115088574588299,0.207392603158951,-0.044600371271372,-0.010126803070307,-0.000789787096437) * FEATURE2_texOff(vec2(0,0));
res += mat4(-0.318107068538666,0.183389395475388,-0.181762114167213,-0.132796645164490,0.098131872713566,-0.188283860683441,-0.373865634202957,-0.091291531920433,-0.090852037072182,-0.094379298388958,0.069490514695644,-0.079566694796085,0.146915361285210,-0.119273878633976,-0.046790663152933,-0.382096022367477) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.239029094576836,0.322307586669922,-0.145521819591522,-0.073288083076477,0.092551000416279,0.181823849678040,-0.044088680297136,-0.029678527265787,0.011805051006377,-0.082472734153271,0.016589369624853,-0.123843252658844,0.055202800780535,-0.072864823043346,-0.019228428602219,-0.089298509061337) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.172019198536873,0.098175682127476,-0.510713160037994,-0.129841387271881,-0.020410211756825,0.003437879029661,0.096899241209030,0.063607454299927,-0.114420220255852,0.001912779523991,-0.082980692386627,0.102040939033031,0.115604780614376,0.033668704330921,-0.025090334936976,0.010462109930813) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.018065618351102,-0.147044911980629,-0.092679396271706,-0.032028596848249,-0.101831927895546,0.042800527065992,0.171847224235535,-0.119088612496853,0.049850992858410,0.034466050565243,0.017414044588804,0.034425351768732,0.129164204001427,-0.141929849982262,-0.184037894010544,-0.258053302764893) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.149993300437927,0.196095049381256,-0.008892118930817,0.018917417153716,0.019628951326013,-0.144927859306335,-0.015997136011720,-0.055709429085255,-0.002590435091406,-0.139656618237495,-0.099750444293022,-0.101023025810719,-0.192820519208908,-0.441432565450668,-0.001598283066414,0.046549115329981) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.200301751494408,-0.154570698738098,-0.059564676135778,0.119798071682453,-0.436471819877625,-0.077972106635571,0.059571571648121,-0.017436329275370,0.050118707120419,-0.356985360383987,0.003768049180508,-0.094483286142349,0.383190721273422,-0.117178648710251,-0.139091596007347,0.138231992721558) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.019302593544126,0.002912611933425,0.099702008068562,-0.157203525304794,-0.064740672707558,-0.223902255296707,-0.010044610127807,0.063685096800327,-0.090968079864979,0.149217978119850,-0.073788680136204,-0.012987849302590,0.184175044298172,0.430334419012070,-0.118246689438820,-0.083711445331573) * FEATURE3_texOff(vec2(-1,1));
res += mat4(-0.061371792107821,-0.242374002933502,-0.102850109338760,-0.102493382990360,0.192288294434547,0.343746811151505,0.053239058703184,0.024041881784797,-0.011458566412330,-0.169375658035278,0.248054295778275,-0.158424735069275,0.001529072411358,-0.469255149364471,-0.234983876347542,-0.017000267282128) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.005551581270993,0.297331511974335,0.470447123050690,0.064745388925076,0.163062095642090,-0.044571600854397,0.003642911789939,-0.121368966996670,-0.112396098673344,0.156271398067474,0.250085145235062,-0.014268656261265,-0.591540992259979,0.239541351795197,0.555482506752014,0.022034965455532) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.082292735576630,-0.036516878753901,-0.046221926808357,-0.040245141834021,0.061638101935387,-0.076102659106255,0.124487467110157,0.115257129073143,-0.186784699559212,0.016616841778159,-0.113115467131138,-0.113138258457184,-0.114722110331059,0.086394704878330,0.047876518219709,-0.327457159757614) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.008268784731627,-0.053099144250154,-0.092336788773537,-0.002609175629914,-0.101630330085754,0.122141800820827,-0.236988618969917,-0.180908024311066,0.059645462781191,0.107210591435432,-0.076911173760891,-0.112507149577141,0.034660421311855,0.269867628812790,0.128430768847466,0.020879702642560) * FEATURE3_texOff(vec2(1,-1));
res += mat4(-0.232934579253197,0.205570191144943,-0.242906242609024,-0.322367548942566,0.259773373603821,-0.095971547067165,-0.019174387678504,0.426755160093307,-0.026981703937054,-0.194746375083923,0.057428229600191,0.176307290792465,0.125668272376060,0.180868193507195,-0.111615300178528,-0.340005338191986) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.272713124752045,-0.047547299414873,0.098034493625164,-0.100217334926128,-0.009221388027072,0.187704905867577,0.052623808383942,-0.062464274466038,0.012416413985193,0.060610733926296,-0.041101735085249,0.058379080146551,0.067299284040928,-0.244010403752327,-0.169084206223488,0.186491295695305) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.879211187362671,-0.335923701524734,-0.285492986440659,0.939493358135223) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.137908771634102,0.007827184163034,0.046035345643759,-0.712361037731171);
res += mat4(-0.084424264729023,0.132734835147858,0.026614980772138,-0.071959070861340,-0.080709442496300,-0.138127833604813,0.027926621958613,0.148709580302238,0.110370174050331,0.051648095250130,0.052498210221529,-0.005709304008633,-0.057342510670424,0.152396976947784,-0.035296402871609,-0.191226020455360) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.050195828080177,-0.242040634155273,0.020271111279726,-0.025202203541994,0.151097252964973,0.119032762944698,-0.047325477004051,-0.024611987173557,0.290939420461655,0.183664411306381,0.010580518282950,0.125908225774765,0.013458272442222,0.036402214318514,0.143209606409073,-0.292621672153473) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.099430970847607,-0.276110291481018,-0.093778640031815,0.002314482349902,0.091698065400124,0.078341320157051,-0.004273181315511,-0.089689992368221,0.043461900204420,0.024666206911206,0.084764041006565,0.180212914943695,-0.072218574583530,0.196434900164604,0.007621068973094,-0.260444849729538) * FEATURE1_texOff(vec2(-1,1));
res += mat4(-0.031930189579725,0.030763586983085,-0.045998264104128,0.119391597807407,0.339041382074356,-0.140574961900711,0.057599622756243,0.116221457719803,-0.153179869055748,0.237435147166252,0.056598696857691,-0.103263527154922,-0.098211519420147,-0.032613940536976,0.054100614041090,-0.242837995290756) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.050610221922398,0.134785264730453,-0.056194089353085,0.151687145233154,-0.768778085708618,0.007622419856489,0.328532397747040,-0.411681443452835,0.058988094329834,0.119708873331547,0.063231281936169,-0.066286899149418,-0.119050540030003,-0.098995923995972,0.073381461203098,-0.098895631730556) * FEATURE1_texOff(vec2(0,0));
res += mat4(0.014000440016389,-0.369572132825851,0.126113399863243,-0.705789268016815,-0.012605208903551,0.285140037536621,-0.144452407956123,0.134298726916313,-0.055946327745914,0.109421126544476,-0.058960448950529,-0.108430147171021,-0.013224788010120,0.190153807401657,0.166094392538071,-0.224719747900963) * FEATURE1_texOff(vec2(0,1));
res += mat4(0.115162037312984,0.055826582014561,0.048307985067368,0.008438987657428,0.295471966266632,0.250587433576584,0.035414490848780,-0.112114585936069,0.059662379324436,0.173557683825493,-0.075251661241055,-0.152645602822304,-0.106134928762913,0.199785903096199,-0.096325069665909,-0.130989596247673) * FEATURE1_texOff(vec2(1,-1));
res += mat4(0.027611810714006,-0.084237329661846,0.155432209372520,-0.138243496417999,0.189582154154778,-0.208061859011650,-0.227864965796471,0.199730262160301,-0.003553562797606,-0.094301491975784,-0.071799792349339,0.220678254961967,-0.030792292207479,-0.053198266774416,-0.044772244989872,-0.010532935149968) * FEATURE1_texOff(vec2(1,0));
res += mat4(0.250241547822952,-0.392952978610992,-0.099096961319447,-0.559060752391815,-0.004019107669592,-0.056860607117414,0.067075684666634,-0.006345211062580,0.027142532169819,0.076320305466652,-0.103994823992252,0.257470518350601,0.117060385644436,0.027227384969592,-0.146148115396500,-0.086900509893894) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.095079161226749,-0.132207676768303,-0.090529568493366,-0.025144241750240,-0.093562155961990,0.273963093757629,0.136011287570000,-0.052301935851574,0.075651697814465,0.020220041275024,-0.027577288448811,0.032588236033916,0.173155948519707,0.126072451472282,-0.002894298406318,0.118070602416992) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(0.190932109951973,-0.239751771092415,0.123810306191444,-0.054427105933428,0.483871340751648,-0.307271778583527,-0.228035017848015,0.298116862773895,-0.195383414626122,-0.048621471971273,0.103100046515465,-0.178825154900551,0.115842565894127,0.124259509146214,-0.128505319356918,0.133446827530861) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.077830448746681,0.282262235879898,0.014931602403522,-0.209814265370369,-0.021537737920880,-0.063755616545677,0.016794737428427,-0.074669323861599,0.027983877807856,-0.109639413654804,-0.041684947907925,0.076139658689499,-0.050836462527514,0.018564103171229,0.049512837082148,0.317807018756866) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.147741779685020,-0.163315206766129,-0.074286863207817,-0.311491698026657,-0.129753336310387,0.190718919038773,0.016679041087627,-0.399646133184433,-0.032878585159779,0.236790150403976,-0.047980364412069,-0.075276963412762,0.015097983181477,0.071665033698082,0.060761161148548,0.035526644438505) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.088792055845261,-0.126746267080307,0.156877905130386,-0.327132761478424,-0.343403249979019,-0.328688919544220,0.330916285514832,-0.012382204644382,-0.233905106782913,0.099070116877556,-0.166776761412621,-0.284177899360657,-0.056825604289770,-0.111536413431168,-0.237695008516312,0.033798463642597) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.056117329746485,0.049917608499527,0.023865677416325,0.056258082389832,0.250786632299423,0.102891653776169,-0.132400721311569,0.262180656194687,0.060447618365288,-0.138001471757889,0.161121368408203,0.056802041828632,0.039198886603117,0.281313925981522,0.048626426607370,0.106792189180851) * FEATURE2_texOff(vec2(0,1));
res += mat4(-0.011150595732033,0.020111566409469,0.125030413269997,0.130948096513748,0.004895143210888,0.179110854864120,-0.055023401975632,0.058827251195908,0.100494459271431,0.023407211527228,-0.042311817407608,-0.079903088510036,-0.131731852889061,-0.123525857925415,-0.047382686287165,0.205790758132935) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.366534024477005,0.217407643795013,-0.440736830234528,0.293760597705841,-0.145089998841286,-0.111766554415226,-0.063237793743610,-0.042046766728163,-0.126315400004387,0.050099123269320,-0.221949055790901,-0.014833594672382,-0.012652884237468,-0.121445119380951,0.255593419075012,0.040369585156441) * FEATURE2_texOff(vec2(1,0));
res += mat4(0.024673406034708,-0.148169487714767,-0.086523018777370,0.131746098399162,-0.179084971547127,-0.105754435062408,0.234321355819702,-0.101433783769608,-0.024378357455134,0.165151521563530,-0.177188441157341,0.162475943565369,0.011041918769479,-0.008098791353405,-0.094845928251743,0.207324713468552) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.250413358211517,-0.362253695726395,0.077693641185760,0.046502266079187,-0.047259651124477,0.104685589671135,-0.028734227642417,-0.083055138587952,0.342012673616409,-0.046030074357986,0.033033404499292,-0.015158365480602,-0.102819293737411,0.167179837822914,0.061543807387352,-0.249418333172798) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.078271619975567,0.261712849140167,0.102130889892578,0.244150236248970,0.083107940852642,-0.025954270735383,0.037316307425499,-0.091580167412758,-0.055195912718773,0.064543105661869,-0.090352527797222,0.299980252981186,0.308854222297668,0.483565837144852,-0.132270157337189,-0.314352750778198) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.091298460960388,-0.054455108940601,-0.041841547936201,-0.123745925724506,-0.059518728405237,-0.158551156520844,0.020708326250315,-0.053638841956854,0.120692625641823,0.164463207125664,-0.063837826251984,0.179211229085922,0.011283692903817,0.199901595711708,-0.193314626812935,-0.204719930887222) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.241358727216721,0.014093476347625,-0.239068895578384,0.085663065314293,0.213674321770668,-0.050691910088062,-0.033463533967733,-0.075005106627941,0.157490566372871,-0.037137955427170,0.239594787359238,-0.150394737720490,-0.151990905404091,-0.013631146401167,-0.087566487491131,-0.149144589900970) * FEATURE3_texOff(vec2(0,-1));
res += mat4(0.032756973057985,-0.346428453922272,0.121350541710854,-0.229278489947319,-0.278165191411972,0.187736779451370,-0.001457994454540,0.189461559057236,-0.174811407923698,0.111986771225929,0.353901833295822,-0.397006958723068,0.021261394023895,-0.480611830949783,-0.084453158080578,-0.611665189266205) * FEATURE3_texOff(vec2(0,0));
res += mat4(0.102329246699810,-0.042051330208778,0.155784949660301,0.038710575550795,0.042103197425604,-0.252739667892456,-0.037634074687958,-0.079969488084316,-0.080082409083843,-0.011456821113825,0.303127348423004,-0.164486423134804,-0.085276216268539,-0.146425619721413,0.076122075319290,-0.082266129553318) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.198714047670364,0.004349012859166,0.361494630575180,-0.144273012876511,0.074225895106792,0.011494964361191,0.051070999354124,0.030376683920622,0.240683779120445,-0.070410773158073,-0.099528767168522,0.029877984896302,0.003081705188379,-0.082879252731800,0.058323524892330,0.127788096666336) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.076511569321156,0.536153614521027,-0.124904766678810,0.018106563016772,0.113342337310314,0.452975749969482,0.008368061855435,0.230531528592110,0.221340924501419,0.115724533796310,-0.627889931201935,0.072224020957947,-0.021181616932154,-0.001237833523192,0.297854363918304,-0.089143045246601) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.109761573374271,-0.233041375875473,-0.296110630035400,-0.048678833991289,0.096579439938068,0.049575306475163,-0.072189286351204,-0.026420837268233,-0.124023064970970,0.018802439793944,-0.204829975962639,-0.218375414609909,-0.012001533061266,-0.168815061450005,0.146538898348808,-0.013779427856207) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(1.086038708686829,0.519634842872620,-0.634235680103302,-0.053105168044567) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL3
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 1_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.041560731828213,-0.606952250003815,-0.035847526043653,-0.108849562704563);
res += mat4(-0.289042770862579,-0.740218937397003,0.194630324840546,0.009050443768501,-0.059946637600660,0.190836831927299,0.119006730616093,0.039111003279686,0.039559774100780,-0.107779607176781,-0.090730093419552,0.124739050865173,-0.190854325890541,-0.055063251405954,0.092597387731075,-0.213703021407127) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.320196866989136,-0.189085781574249,0.230645179748535,-0.095212489366531,0.041792817413807,0.037380062043667,0.122230447828770,-0.051511958241463,0.222572922706604,0.006146762054414,-0.074343129992485,0.061475515365601,0.067425154149532,0.061040207743645,-0.375956058502197,-0.213059052824974) * FEATURE1_texOff(vec2(-1,0));
res += mat4(-0.341020435094833,0.074584893882275,0.128247767686844,0.095770284533501,-0.009727570228279,-0.014860089868307,-0.188138857483864,-0.008042337372899,0.015177228488028,0.052072908729315,-0.104911468923092,0.064783848822117,0.139097377657890,0.157464027404785,-0.448300510644913,-0.275226533412933) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.045784641057253,0.408805578947067,-0.316522985696793,0.221171543002129,-0.059487074613571,-0.623856067657471,-0.217259645462036,-0.142922967672348,-0.013524487614632,-0.606250584125519,0.198292672634125,0.095334425568581,0.193489804863930,0.167780220508575,-0.002331313677132,-0.205232441425323) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.243126273155212,-0.357547789812088,-0.268433481454849,0.106574930250645,-0.306915342807770,0.221649810671806,0.274579614400864,0.043518651276827,0.114232420921326,-0.029541013762355,0.051353681832552,0.052059389650822,-0.108052082359791,0.258639872074127,0.074308261275291,-0.374779731035233) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.091833263635635,0.132489919662476,-0.059373684227467,0.099100828170776,0.091823175549507,-0.097550429403782,0.319202303886414,-0.015671381726861,-0.114583447575569,0.228173211216927,-0.195572897791862,0.255199998617172,0.109536208212376,-0.030887063592672,0.183966740965843,-0.143936187028885) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.038326270878315,0.188471585512161,0.042705800384283,0.007637401577085,-0.176433593034744,0.267204523086548,0.011751255020499,-0.032428484410048,0.120082490146160,-0.063171207904816,-0.095927409827709,0.079444915056229,-0.058178443461657,0.065665528178215,-0.058387283235788,-0.265671491622925) * FEATURE1_texOff(vec2(1,-1));
res += mat4(0.174752622842789,-0.275148719549179,0.100597001612186,-0.553961932659149,0.392151147127151,-0.023483961820602,-0.199737623333931,0.286740183830261,-0.024008914828300,0.192584350705147,0.011425989679992,-0.143275454640388,-0.235960200428963,0.081823326647282,-0.024617059156299,1.020447850227356) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.105683371424675,0.129741922020912,-0.017215136438608,0.021635444834828,0.151220917701721,-0.129153773188591,-0.137134626507759,0.021114826202393,-0.064058244228363,0.120949849486351,-0.114031136035919,-0.193787738680840,0.038160007447004,0.220419436693192,-0.066493839025497,0.201647400856018) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.042118784040213,-0.187845990061760,0.060109645128250,-0.106769815087318,-0.066370271146297,0.164395242929459,0.090420976281166,-0.037058241665363,-0.102564394474030,0.673608958721161,0.033316444605589,0.109801262617111,0.065546177327633,0.162653267383575,-0.017043586820364,-0.048997182399035) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.290802180767059,0.153414219617844,-0.143370330333710,0.036283738911152,-0.068513900041580,0.106517516076565,0.080590173602104,0.026094745844603,0.244144588708878,0.001158800907433,-0.228961929678917,-0.295345574617386,-0.113557256758213,0.104070134460926,0.004632870666683,-0.010619007050991) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.034672234207392,0.096104688942432,-0.212149724364281,-0.051272124052048,0.183418229222298,0.053863987326622,-0.170631051063538,0.009837051853538,-0.028584757819772,-0.047879926860332,-0.168081358075142,0.096037462353706,-0.259243965148926,0.114689618349075,-0.025441350415349,0.073643624782562) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.145226642489433,-0.461857497692108,-0.109716467559338,-0.049665275961161,-0.135180309414864,0.291514247655869,0.063849948346615,0.045972086489201,-0.095270559191704,0.381313294172287,0.056050498038530,-0.009034401737154,0.050424035638571,-0.052910484373569,0.015439989976585,0.064640901982784) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.424994260072708,0.069403886795044,0.291081219911575,0.065410822629929,-0.193051069974899,0.459212601184845,0.047127634286880,-0.154427796602249,0.139347374439240,-0.242556840181351,0.158843189477921,0.449326276779175,-0.390223979949951,-0.229281216859818,-0.138337984681129,0.099704153835773) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.084678009152412,0.170976132154465,0.613570988178253,-0.087071277201176,0.415295541286469,-0.016632910817862,0.137602716684341,-0.169684231281281,0.107374034821987,-0.093419961631298,0.157117739319801,-0.155657336115837,-0.640734553337097,0.013172824867070,-0.260633945465088,0.051357463002205) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.007001500576735,0.224121645092964,-0.056142129004002,-0.243063300848007,0.105279199779034,-0.099402800202370,-0.127140745520592,-0.028104517608881,-0.036019127815962,-0.042772319167852,-0.049316097050905,-0.084176674485207,-0.007343859411776,-0.180710747838020,-0.034161139279604,-0.108386881649494) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.011664780788124,-0.041223935782909,-0.242483660578728,0.675376355648041,0.002458740491420,-0.029716335237026,-0.136480003595352,-0.143996313214302,-0.100785441696644,-0.085423655807972,0.049437157809734,0.066328607499599,-0.276494413614273,-0.099069632589817,0.038652524352074,0.042358696460724) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.055112373083830,-0.041219808161259,-0.325019687414169,0.117759630084038,-0.017820317298174,0.001937180873938,-0.127810761332512,-0.150563180446625,0.100604213774204,-0.120483033359051,0.067905172705650,-0.104416906833649,-0.473798602819443,0.006938726175576,0.001880507101305,-0.373304158449173) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.140208303928375,0.216639146208763,0.076430268585682,-0.176430538296700,0.159010276198387,-0.007052418775856,0.000667360029183,-0.083282016217709,-0.296749651432037,-0.095199964940548,0.115710020065308,0.179350882768631,-0.067341543734074,0.152996227145195,0.131103903055191,0.000921042170376) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.077039696276188,-0.023936886340380,-0.255259305238724,0.104313023388386,0.008430084213614,-0.075368039309978,-0.014192418195307,0.080853886902332,-0.019005842506886,0.073311500251293,-0.266777217388153,0.049508400261402,0.147494465112686,0.042390279471874,-0.005407926626503,0.038688387721777) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.022222576662898,0.052710887044668,-0.099652834236622,-0.121724843978882,-0.114043980836868,0.026494929566979,0.230895638465881,0.052015487104654,0.036174990236759,-0.063562698662281,-0.258063256740570,0.149855017662048,0.103135786950588,0.014641492627561,-0.044486582279205,0.002818394219503) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.025593357160687,-0.103186957538128,-0.101791195571423,0.209785282611847,-0.315435260534286,0.346440047025681,0.122894808650017,-0.107403799891472,-0.072574876248837,-0.151384845376015,0.136497288942337,-0.056583743542433,0.454590946435928,-0.624704003334045,-0.301772534847260,-0.033292300999165) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.111523643136024,-0.115642577409744,-0.335999250411987,-0.543959677219391,0.189377099275589,-0.197633698582649,0.140538826584816,0.000066610315116,0.031724315136671,0.078393273055553,0.091839723289013,-0.107584990561008,-0.530603229999542,-0.056280691176653,0.106523685157299,-0.149894282221794) * FEATURE3_texOff(vec2(0,0));
res += mat4(0.264462351799011,-0.082411363720894,-0.150726720690727,0.053109005093575,0.019555125385523,-0.004518868867308,-0.293528825044632,0.009249577298760,0.034325331449509,-0.000680577999447,0.060693342238665,0.027597479522228,0.216889560222626,0.098871245980263,0.196713700890541,-0.069163709878922) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.024993201717734,-0.172746300697327,0.080681137740612,-0.262744963169098,0.150774106383324,0.047368254512548,-0.104322180151939,0.122022323310375,0.084757626056671,0.115505054593086,-0.116401314735413,0.018546111881733,-0.080065809190273,-0.011966276913881,0.074160546064377,-0.286787629127502) * FEATURE3_texOff(vec2(1,-1));
res += mat4(-0.075434438884258,-0.032278507947922,0.263666778802872,0.481972873210907,-0.169395118951797,-0.110788539052010,-0.082724295556545,-0.217640757560730,0.082988537847996,0.086053878068924,-0.028653467074037,0.099981650710106,0.076092980802059,0.152086511254311,-0.199578016996384,0.398536294698715) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.005776674952358,0.035804938524961,0.161008119583130,-0.192059740424156,-0.060402262955904,-0.000887118338142,0.010380375199020,0.028993995860219,0.011028758250177,-0.047765638679266,-0.122513033449650,0.042263619601727,-0.038354702293873,-0.042035881429911,-0.120544940233231,0.235355824232101) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.243245974183083,0.088597141206264,-0.159976810216904,-0.029116395860910) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.098221898078918,0.009381215088069,-0.131157025694847,0.119431547820568);
res += mat4(0.048480316996574,0.114481091499329,-0.018345626071095,0.082003124058247,-0.137827754020691,-0.013579186052084,-0.093636982142925,-0.078447535634041,-0.034067906439304,0.076302185654640,0.194290995597839,-0.178617715835571,-0.029270447790623,0.064038001000881,0.060331273823977,0.057557869702578) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.089510753750801,0.219299346208572,-0.311615854501724,-0.012734137475491,0.352245002985001,-0.124302253127098,0.010963173583150,-0.124960377812386,0.085471175611019,0.047882147133350,-0.148337483406067,-0.164460211992264,0.073212511837482,0.244987413287163,-0.147191762924194,0.057734917849302) * FEATURE1_texOff(vec2(-1,0));
res += mat4(-0.029648730531335,0.306814700365067,0.102217495441437,-0.091561079025269,0.034093383699656,-0.132489845156670,0.018583768978715,0.048858694732189,-0.015067169442773,-0.140346869826317,-0.086601950228214,-0.154326096177101,-0.094614572823048,0.036615695804358,-0.134774222970009,0.068777963519096) * FEATURE1_texOff(vec2(-1,1));
res += mat4(-0.104449860751629,-0.010151112452149,0.030927771702409,-0.012001625262201,-0.018254010006785,0.310440480709076,-0.058610789477825,-0.324778944253922,-0.003116251435131,0.078273199498653,-0.042315077036619,0.125130966305733,0.014199499972165,0.303706377744675,0.071171358227730,-0.084990948438644) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.075128845870495,-0.148786976933479,-0.195127055048943,-0.265502303838730,-0.241721034049988,0.169398605823517,0.258244305849075,0.357139647006989,-0.026660496369004,0.070607244968414,-0.192514106631279,0.296498298645020,-0.117050401866436,0.898059666156769,0.159761458635330,0.433594107627869) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.016191111877561,-0.091999888420105,-0.095782510936260,-0.032872658222914,0.080831810832024,-0.267823368310928,0.384949654340744,-0.099919542670250,-0.037441365420818,0.159132912755013,0.549466967582703,0.041820731014013,0.054713826626539,-0.052543897181749,0.113997578620911,-0.024710206314921) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.002134555717930,0.014327779412270,0.016363842412829,-0.173190876841545,0.061981897801161,-0.166722446680069,-0.081841468811035,0.182179480791092,0.065775245428085,0.203358799219131,0.155644029378891,0.047799270600080,-0.048065006732941,0.112648598849773,0.174909085035324,-0.066001869738102) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.048988305032253,-0.144247978925705,-0.087903372943401,-0.133783087134361,0.133291453123093,-0.272683590650558,-0.201790675520897,-0.036822672933340,0.083655416965485,0.376551389694214,-0.062531135976315,-0.029675425961614,-0.048093345016241,0.272696375846863,0.315430581569672,0.187079921364784) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.045880679041147,0.061520036309958,-0.239618137478828,-0.149423733353615,-0.091004416346550,-0.089143693447113,-0.082947030663490,-0.028911396861076,0.005498218350112,0.062941975891590,0.079801104962826,0.068143583834171,-0.036815159022808,-0.074987307190895,-0.181989535689354,-0.098375983536243) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.108270563185215,-0.020604396238923,-0.129438266158104,-0.119061082601547,-0.011035067960620,0.130475670099258,-0.035503387451172,0.097123563289642,0.033424701541662,-0.003479147097096,0.019559534266591,0.000482925155666,-0.015298982150853,-0.059573851525784,-0.023093357682228,-0.038707226514816) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(0.392179697751999,0.210603669285774,0.069013029336929,0.066071659326553,-0.077594950795174,-0.203405678272247,-0.091607891023159,-0.239090710878372,0.032502815127373,0.114152118563652,-0.017344009131193,0.054478641599417,-0.010956696234643,-0.183063209056854,0.125977039337158,-0.174436509609222) * FEATURE2_texOff(vec2(-1,0));
res += mat4(-0.011453296057880,0.012791001237929,-0.054861750453711,0.078178621828556,-0.112804904580116,0.148621112108231,-0.278507739305496,0.152256757020950,0.032714486122131,-0.066940717399120,-0.021470457315445,0.011455623432994,-0.082716912031174,-0.232252493500710,-0.016871226951480,-0.087403014302254) * FEATURE2_texOff(vec2(-1,1));
res += mat4(-0.046353861689568,-0.031319327652454,-0.109694212675095,-0.328885674476624,-0.120255678892136,0.201627746224403,0.105567380785942,0.244767606258392,0.149010553956032,-0.024160185828805,0.036582335829735,0.134272754192352,0.060820166021585,0.224379375576973,0.020249687135220,-0.064175203442574) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.407586544752121,0.740072786808014,0.498910129070282,0.522560834884644,0.045138128101826,-0.035476908087730,0.134876534342766,0.029651932418346,0.373154282569885,0.144406646490097,-0.019040744751692,0.118455544114113,-0.024159744381905,0.127548173069954,-0.051216233521700,0.269914835691452) * FEATURE2_texOff(vec2(0,0));
res += mat4(-0.053430411964655,-0.237018764019012,0.514124989509583,-0.058703869581223,0.131081461906433,-0.275153905153275,-0.382668852806091,-0.287732392549515,-0.053214341402054,-0.168442249298096,-0.157276302576065,0.024522218853235,0.015633773058653,-0.580056130886078,0.001500401995145,-0.263584941625595) * FEATURE2_texOff(vec2(0,1));
res += mat4(-0.064741887152195,-0.289798676967621,-0.062858395278454,-0.063502803444862,0.019197158515453,-0.082537077367306,0.033841468393803,-0.110445223748684,0.071590974926949,-0.173574939370155,0.079994939267635,-0.132585242390633,0.014291953295469,0.151953458786011,-0.128614604473114,0.019550282508135) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.395424902439117,-0.808882713317871,-0.034306667745113,-0.022149486467242,-0.023272037506104,0.069189801812172,0.113776996731758,-0.104749441146851,-0.123277634382248,0.003752297488973,0.295714676380157,-0.139423355460167,-0.024187665432692,0.170255005359650,0.199143812060356,0.120939277112484) * FEATURE2_texOff(vec2(1,0));
res += mat4(0.030033729970455,-0.294706881046295,-0.418922692537308,-0.005717475432903,-0.043024923652411,-0.014052193611860,0.121169582009315,0.031397521495819,0.095883063971996,-0.050077002495527,-0.081650726497173,0.064916290342808,0.074386768043041,-0.220112726092339,-0.031065540388227,0.000430149724707) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.477631270885468,0.037265494465828,-0.243747323751450,0.105853535234928,0.098691746592522,-0.050912156701088,-0.011012010276318,-0.002063554944471,0.212752968072891,-0.020547546446323,0.055368550121784,-0.199076637625694,-0.032302301377058,0.058145303279161,0.158604398369789,0.034926932305098) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.203741550445557,-0.037097893655300,0.130162701010704,-0.000486844044644,0.329827308654785,-0.007291872985661,0.133629009127617,0.000343335937941,0.764532089233398,0.127617716789246,0.122978761792183,-0.152416512370110,0.293197333812714,-0.278954446315765,-0.124450139701366,-0.202077463269234) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.065756991505623,0.034038737416267,0.064996317028999,-0.052806437015533,-0.138503417372704,0.036460801959038,-0.093633629381657,-0.011079656891525,-0.182886287570000,0.012757319957018,-0.151125699281693,-0.087560921907425,-0.002409933833405,0.092132590711117,-0.319665580987930,-0.176089733839035) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.008000744506717,0.063509240746498,0.065495684742928,-0.086880542337894,-0.095778092741966,0.013924732804298,-0.033012554049492,0.132118627429008,-0.240144968032837,0.050937574356794,0.074692822992802,-0.007935034111142,0.011984761804342,-0.149379357695580,-0.091772712767124,-0.783460021018982) * FEATURE3_texOff(vec2(0,-1));
res += mat4(0.369399577379227,0.160409569740295,-0.259553045034409,0.290402501821518,-0.322172462940216,-0.046398814767599,0.287797302007675,-0.070696674287319,0.053863622248173,0.263069778680801,0.211234927177429,0.295159518718719,-0.122139073908329,0.591378033161163,-0.076808720827103,0.403922855854034) * FEATURE3_texOff(vec2(0,0));
res += mat4(0.121011838316917,-0.118802450597286,0.401229470968246,-0.052281066775322,0.173254176974297,0.090652488172054,-0.007911412976682,-0.120518520474434,-0.103190034627914,-0.164005428552628,0.127990841865540,0.050151899456978,0.012581665068865,-0.075845897197723,0.558126568794250,0.204101637005806) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.101848505437374,0.044882249087095,0.019436020404100,-0.053977359086275,0.032332710921764,-0.055613312870264,0.115233592689037,-0.025784295052290,0.037998571991920,-0.087416172027588,0.033634550869465,0.024872938171029,-0.015374436043203,0.159864515066147,-0.033199880272150,-0.002006240654737) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.151028975844383,-0.246754944324493,0.218696638941765,-0.056018125265837,0.115661971271038,-0.086617939174175,0.309058427810669,0.051134958863258,0.049351211637259,-0.112602129578590,-0.226167246699333,0.003837446682155,-0.022296283394098,-0.074473448097706,-0.115761794149876,0.189501687884331) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.111079514026642,0.222438156604767,-0.099914565682411,-0.031050072982907,-0.001621853210963,0.198846548795700,-0.042104125022888,0.165705293416977,-0.015051787719131,0.023319464176893,0.244071096181870,-0.080727770924568,-0.059725079685450,0.130716979503632,-0.081462711095810,0.094629153609276) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.515538334846497,0.021199107170105,0.244644716382027,-0.109562687575817) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL4
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 2_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.092875570058823,0.046803962439299,-0.154674291610718,-0.069637276232243);
res += mat4(-0.230493336915970,-0.075177177786827,0.104035139083862,0.020057991147041,0.022770758718252,0.055748522281647,0.085871323943138,-0.075638808310032,-0.123883999884129,-0.166660591959953,-0.182156220078468,-0.225807085633278,0.072183050215244,-0.013611230999231,0.032885018736124,0.058458253741264) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.160881608724594,0.071722470223904,-0.215729087591171,-0.025860430672765,0.082184880971909,0.076795287430286,0.008112380281091,-0.328880876302719,-0.121499203145504,0.168332397937775,0.132394760847092,0.003916163463145,0.303527802228928,-0.231998905539513,-0.009639292955399,-0.123270638287067) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.000292913318845,0.276969850063324,-0.171330600976944,-0.031634069979191,-0.085263311862946,-0.159641578793526,0.210760369896889,0.092277161777020,-0.058959528803825,-0.025894211605191,0.284681558609009,-0.034692849963903,-0.074162676930428,0.166272148489952,0.003242385108024,-0.060438774526119) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.139504209160805,0.032246239483356,0.017250040546060,-0.012796819210052,0.059154171496630,0.020592126995325,-0.206069856882095,-0.187357038259506,-0.236249238252640,-0.101144425570965,0.232919767498970,-0.228283584117889,-0.196203723549843,0.110512323677540,-0.183754205703735,0.133583471179008) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.236197352409363,-0.003564349841326,-0.280764997005463,0.020288970321417,0.115047149360180,0.213319331407547,0.160231754183769,-0.634552240371704,0.207687079906464,0.070480808615685,-0.042033389210701,0.116084486246109,0.361075699329376,-0.242629691958427,0.385963231325150,-0.017136020585895) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.206063717603683,0.511902332305908,0.382710486650467,0.000068745255703,-0.192229568958282,-0.243537053465843,-0.076270639896393,0.454132616519928,-0.096589386463165,0.004201114643365,-0.031442370265722,0.137006297707558,-0.015213387086987,0.227953985333443,0.059182535856962,-0.197474420070648) * MODEL1_texOff(vec2(0,1));
res += mat4(0.093598917126656,-0.023114340379834,-0.069776162505150,0.043389722704887,-0.123140297830105,0.034301232546568,-0.057686235755682,0.061917796730995,-0.062671579420567,-0.002853761659935,0.185212746262550,-0.024517746642232,0.023788530379534,0.022935489192605,-0.089116290211678,0.029863646253943) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.002030632924289,-0.033945243805647,0.093361809849739,-0.038833670318127,0.014654234051704,0.082164585590363,-0.034810908138752,0.031267683953047,0.103295445442200,-0.110552139580250,-0.041084621101618,-0.141272708773613,-0.194872036576271,0.042625963687897,0.078893184661865,0.009250521659851) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.009604698047042,0.016036661341786,-0.070535413920879,-0.090026333928108,0.127907186746597,0.004298478364944,0.050630446523428,0.018701976165175,-0.044812936335802,0.192492932081223,0.070812620222569,-0.019142901524901,-0.076566472649574,0.042249292135239,0.039480347186327,-0.072069682180882) * MODEL1_texOff(vec2(1,1));
res += mat4(0.038950271904469,-0.164646908640862,-0.072725772857666,-0.110669098794460,0.030374890193343,-0.029360190033913,0.220119014382362,0.020271465182304,-0.126752316951752,0.059316966682673,-0.034594587981701,0.275844126939774,-0.293374180793762,-0.044559143483639,-0.051888171583414,0.070649117231369) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.199145019054413,-0.089723594486713,-0.072441130876541,-0.103929482400417,0.156185179948807,0.001321505988017,0.261077672243118,-0.079977795481682,-0.162198096513748,-0.142905756831169,0.195366904139519,0.603194713592529,0.391131013631821,0.016051907092333,-0.000962172285654,0.042502250522375) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.042194396257401,0.058628838509321,-0.027181135490537,-0.054107658565044,0.083765067160130,0.020811695605516,0.146418988704681,-0.030831132084131,-0.004942124709487,-0.062553703784943,0.063879825174809,0.077131688594818,0.032559886574745,0.293498069047928,0.152835443615913,-0.029517935588956) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.237053275108337,-0.125213712453842,-0.094030305743217,0.111461475491524,-0.092455498874187,-0.081323437392712,0.306244909763336,-0.045083567500114,0.024094102904201,-0.064280420541763,-0.062623724341393,0.133284345269203,0.141033872961998,-0.106146387755871,-0.105365239083767,0.020684188231826) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.245146527886391,0.043295275419950,-0.105977043509483,0.288668900728226,-0.040980864316225,0.190708443522453,0.283606529235840,-0.079685367643833,0.021537918597460,0.025644674897194,0.085164695978165,0.153337150812149,-0.265990227460861,0.381441682577133,0.105758480727673,-0.012434951029718) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.018504666164517,-0.041680339723825,-0.212144389748573,-0.040957201272249,-0.131123065948486,0.116463437676430,0.506778955459595,-0.139633908867836,-0.022703085094690,-0.031351730227470,0.057521883398294,0.105971165001392,-0.044166982173920,-0.158513069152832,-0.043776124715805,-0.094864368438721) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.111974470317364,0.105566449463367,-0.091173864901066,0.127331674098969,0.116002872586250,0.024791628122330,0.095842890441418,-0.099215477705002,0.074306242167950,-0.007667826954275,-0.046158391982317,-0.072253964841366,0.007635479327291,0.030194530263543,0.228463187813759,0.010589672252536) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.173611357808113,0.125945806503296,0.162059023976326,0.127432391047478,-0.045756109058857,0.158337339758873,0.494480043649673,-0.119742140173912,0.031516250222921,0.084887281060219,0.103755109012127,0.010692321695387,-0.071316108107567,0.096704505383968,0.027059305459261,-0.057702820748091) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.019320627674460,-0.145924255251884,-0.019409779459238,0.027918715029955,0.183658212423325,-0.102162256836891,0.201448351144791,-0.138926431536674,-0.001208268804476,-0.002519919537008,0.001894571701996,0.047766882926226,0.023884426802397,-0.076444774866104,-0.190359964966774,0.007671867031604) * MODEL2_texOff(vec2(1,1));
res += mat4(0.013158446177840,-0.083490617573261,0.063497893512249,-0.040420439094305,-0.155236363410950,-0.027947073802352,0.043230477720499,-0.000900809478480,0.006417967379093,0.147889345884323,-0.219874337315559,-0.027122538536787,0.128002658486366,-0.040795478969812,-0.147746577858925,-0.114394009113312) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.036339372396469,-0.074014157056808,0.061100464314222,-0.191203519701958,0.061879452317953,0.064911931753159,0.207929775118828,0.082952268421650,-0.073057465255260,0.034775108098984,-0.091654226183891,-0.062621012330055,0.323575228452682,-0.069045148789883,0.120724089443684,-0.510812699794769) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.056901209056377,0.316820830106735,-0.074074335396290,0.010264761745930,-0.032448425889015,0.060554113239050,-0.233930513262749,0.082297012209892,0.019977269694209,0.017740963026881,-0.122639819979668,0.052928209304810,0.100557170808315,0.023223191499710,-0.298624098300934,0.383406549692154) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.078210666775703,0.071232475340366,0.075915113091469,0.042385328561068,-0.297992557287216,-0.091792941093445,-0.054161716252565,-0.023639993742108,0.397017538547516,0.149793848395348,0.129039302468300,-0.257992863655090,-0.095646455883980,-0.041310492902994,-0.009401887655258,0.086969509720802) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.254451811313629,-0.433748960494995,0.112724788486958,0.109566837549210,0.798048615455627,0.083682395517826,-0.065015561878681,0.198303595185280,0.052174568176270,0.051927287131548,-0.134661436080933,0.319198548793793,0.019875340163708,-0.148620530962944,0.028826437890530,0.123764909803867) * MODEL3_texOff(vec2(0,0));
res += mat4(0.002012733137235,0.355519920587540,0.411112099885941,-0.091314524412155,0.413170486688614,-0.261605888605118,-0.461064547300339,-0.184150964021683,-0.007384435739368,-0.011594634503126,-0.097860030829906,0.004295287188143,-0.017962740734220,0.034475289285183,0.002489309990779,0.025322526693344) * MODEL3_texOff(vec2(0,1));
res += mat4(0.038658246397972,-0.024767586961389,0.055531356483698,-0.063942030072212,0.067378714680672,0.028934419155121,-0.108517430722713,-0.102773293852806,-0.516441285610199,0.046894881874323,-0.163311168551445,0.183014690876007,-0.000670133449603,0.046195272356272,-0.059596821665764,0.070616148412228) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.128794118762016,-0.139620169997215,0.177659943699837,-0.089358530938625,-0.072777889668941,-0.022218963131309,-0.041152529418468,-0.153691992163658,0.079690441489220,0.095390118658543,0.060197882354259,-0.142394468188286,0.011095630005002,0.043555218726397,0.020005237311125,0.066158220171928) * MODEL3_texOff(vec2(1,0));
res += mat4(0.044524662196636,0.083580449223518,-0.002368665998802,-0.016897710040212,-0.246524587273598,0.033468648791313,0.282484292984009,-0.213310137391090,0.001915098633617,0.000451303290902,0.000544275855646,0.109793268144131,-0.071118704974651,-0.091216862201691,0.058772765100002,0.025828246027231) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.365569829940796,-0.474557399749756,-0.445288091897964,0.211642727255821) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.396625518798828,0.095056362450123,-0.059266272932291,-0.020599020645022);
res += mat4(0.141198530793190,-0.068096205592155,0.442978918552399,-0.088496886193752,0.104077570140362,0.128276586532593,0.169153898954391,0.043189357966185,-0.042992722243071,0.023267304524779,0.166946679353714,0.039325237274170,0.102561958134174,-0.060250163078308,0.113635815680027,0.038280598819256) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.143847480416298,-0.198990508913994,0.379856020212173,-0.158390566706657,-0.030282663181424,-0.052779793739319,-0.146722853183746,0.014169363304973,-0.030556904152036,-0.216700434684753,-0.152082011103630,-0.144522875547409,0.201983615756035,-0.108361005783081,0.090595580637455,-0.013794119469821) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.072633735835552,0.020341088995337,-0.386938124895096,-0.029388995841146,0.175324380397797,0.060840945690870,0.128928065299988,0.102649465203285,0.007163004018366,-0.191573977470398,-0.260588705539703,-0.162743136286736,0.249943733215332,0.076414830982685,-0.181861713528633,0.027946904301643) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.059422396123409,0.075217053294182,0.105933107435703,-0.456128180027008,0.096422038972378,-0.052691165357828,0.044077675789595,0.012517726980150,-0.252012848854065,0.029343767091632,0.107513882219791,0.272175967693329,0.057236839085817,-0.059524293988943,-0.072756186127663,0.024746980518103) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.546270549297333,0.227190271019936,-0.508376598358154,0.578339695930481,0.270579665899277,0.015231343917549,0.039208967238665,-0.087122350931168,0.296353578567505,-0.081630013883114,0.057456120848656,0.117699958384037,0.425698786973953,-0.023398399353027,0.115045689046383,-0.065529651939869) * MODEL1_texOff(vec2(0,0));
res += mat4(0.131634116172791,0.027524178847671,0.127288565039635,0.073990367352962,-0.073904596269131,-0.050246827304363,0.117571450769901,0.138570651412010,0.301013141870499,0.241762503981590,-0.372131764888763,0.287753194570541,0.420482337474823,0.146983191370964,-0.017356077209115,0.149267107248306) * MODEL1_texOff(vec2(0,1));
res += mat4(0.213683187961578,-0.034434862434864,-0.297272652387619,-0.118622548878193,0.013247129507363,-0.013744650408626,-0.081018164753914,-0.018852762877941,0.042607437819242,0.037951033562422,0.014401634223759,0.052255935966969,0.082600593566895,0.032600540667772,-0.014695873484015,-0.013689722865820) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.173407554626465,0.035280812531710,-0.027465097606182,-0.096235148608685,0.095668509602547,0.008455637842417,0.017571337521076,-0.034056521952152,-0.081380367279053,0.173618748784065,-0.050557978451252,-0.092342153191566,-0.051686458289623,-0.003662295639515,0.027754437178373,0.103836029767990) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.116214409470558,-0.102646201848984,0.262267529964447,-0.018255524337292,0.237574413418770,0.050805598497391,-0.077707171440125,0.080466017127037,-0.009078297764063,0.048636689782143,0.049762368202209,-0.006615933962166,0.124619439244270,-0.070646032691002,0.019360134378076,-0.090796783566475) * MODEL1_texOff(vec2(1,1));
res += mat4(0.164941698312759,-0.012508770450950,-0.204944163560867,0.088183738291264,-0.070779137313366,-0.123357243835926,0.328468173742294,-0.046568296849728,-0.005873200017959,-0.217768207192421,-0.239947155117989,-0.200728252530098,-0.082994386553764,0.008063200861216,0.200765103101730,-0.074761860072613) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.054236512631178,-0.064561732113361,-0.407874733209610,-0.175468936562538,0.153038904070854,-0.260885626077652,0.032005812972784,-0.232663318514824,-0.122673578560352,0.011613862589002,-0.090088933706284,-0.217482849955559,0.103080935776234,0.161963343620300,-0.424554765224457,-0.066185660660267) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.064587011933327,0.058495506644249,0.168287903070450,-0.044678792357445,-0.017508879303932,0.007908815518022,-0.109231017529964,-0.085025832056999,-0.070787496864796,-0.155397310853004,0.169706612825394,-0.054538201540709,-0.389709800481796,0.026239642873406,-0.054229326546192,-0.060829367488623) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.190893724560738,-0.007999958470464,-0.358786314725876,0.162138223648071,-0.127892062067986,0.143480435013771,0.104910351336002,-0.069012947380543,0.020715862512589,-0.062582202255726,-0.045676723122597,-0.110404849052429,0.287144541740417,-0.016329292207956,-0.173064425587654,0.009417889639735) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.170839443802834,0.418663710355759,0.072309091687202,0.503195941448212,-0.205404117703438,-0.085696831345558,0.341121613979340,-0.168506637215614,-0.142623469233513,0.000349295674823,-0.021658346056938,-0.184701174497604,0.536055386066437,0.676861703395844,-0.410688012838364,0.088184408843517) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.076435633003712,0.003749133553356,0.193959727883339,-0.260671645402908,-0.006732484791428,0.038941137492657,-0.296413958072662,-0.240431830286980,0.089290663599968,0.009339094161987,-0.047421921044588,-0.086561188101768,-0.010923250578344,-0.091640755534172,0.316887199878693,-0.103484705090523) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.123270459473133,-0.019255504012108,0.071727916598320,0.093500576913357,0.177066743373871,0.053961418569088,-0.145621195435524,-0.033407188951969,0.055165518075228,0.036523234099150,-0.098492890596390,-0.015582966618240,-0.314955919981003,-0.055443711578846,0.019630562514067,0.093162894248962) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.131164461374283,-0.080025576055050,0.247368395328522,-0.293199062347412,0.226799651980400,0.142497360706329,-0.270949810743332,-0.050721559673548,0.078746922314167,0.108033999800682,0.026997631415725,0.075065143406391,0.221893697977066,-0.397600769996643,0.262044191360474,-0.280283391475677) * MODEL2_texOff(vec2(1,0));
res += mat4(0.003071877639741,0.081612445414066,-0.018580185249448,-0.172687187790871,0.017312780022621,0.012965216301382,0.158549606800079,-0.175513267517090,-0.029953785240650,0.081757925450802,0.009644351899624,0.023708662018180,-0.541828215122223,-0.114078760147095,-0.010921651497483,0.110981166362762) * MODEL2_texOff(vec2(1,1));
res += mat4(0.003514406271279,0.002527193864807,0.021142102777958,0.002601955784485,0.053369782865047,0.001414648257196,-0.136248812079430,-0.114606380462646,-0.016648402437568,-0.130512744188309,-0.024543955922127,-0.136313796043396,0.134957730770111,0.059789061546326,0.137828648090363,-0.009440891444683) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.027731424197555,-0.074762299656868,-0.029455136507750,-0.009317064657807,-0.057751473039389,0.471755146980286,-0.052468691021204,-0.058872498571873,-0.112352862954140,0.035643670707941,-0.224788531661034,-0.301420778036118,0.138501882553101,-0.018314473330975,-0.041479062289000,-0.015167322941124) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.047881785780191,0.038068495690823,-0.043529324233532,-0.012841036543250,0.016721483319998,0.022866994142532,0.115908890962601,-0.090587042272091,-0.014692958444357,0.040071066468954,-0.021878169849515,-0.033509835600853,0.046959150582552,-0.132083222270012,-0.018845856189728,0.133086651563644) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.036697909235954,-0.102034792304039,0.023534927517176,0.032381452620029,-0.087562710046768,0.011928848922253,0.003870145883411,-0.048384975641966,0.409776002168655,-0.331735938787460,-0.172530978918076,0.019745137542486,-0.022782692685723,-0.090990372002125,-0.012493718415499,0.032250195741653) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.003027477534488,-0.219858974218369,0.102303326129913,0.120713070034981,0.887505650520325,-0.072689116001129,0.164866372942924,0.173441052436829,-0.043005190789700,-0.284099459648132,0.023356186226010,-0.132371738553047,0.825049936771393,-0.007956300862134,0.053452655673027,-0.040830176323652) * MODEL3_texOff(vec2(0,0));
res += mat4(0.050784382969141,0.040781114250422,0.009273828938603,0.015891838818789,-0.068503350019455,-0.028876807540655,-0.085634380578995,-0.015552100725472,0.175398960709572,-0.022098360583186,-0.069208964705467,-0.037223253399134,0.008693937212229,-0.039184436202049,-0.243791222572327,0.084609769284725) * MODEL3_texOff(vec2(0,1));
res += mat4(0.008670791983604,0.020512720569968,0.086463607847691,-0.012045120820403,0.103081174194813,-0.021731423214078,0.051775738596916,0.027875825762749,0.194835871458054,0.035175271332264,-0.086056582629681,-0.034356176853180,0.033009007573128,0.035567563027143,0.040190052241087,0.058130037039518) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.083728767931461,-1.264024972915649,0.154642060399055,-0.022204175591469,-0.039374504238367,-0.080463193356991,-0.052063394337893,-0.049005728214979,0.030588237568736,-0.040144052356482,0.055473208427429,-0.010352629236877,0.234370350837708,0.022990683093667,-0.049287538975477,0.015592947602272) * MODEL3_texOff(vec2(1,0));
res += mat4(0.088428564369678,0.108753994107246,-0.157289564609528,0.012717281468213,-0.004348441492766,-0.013199677690864,-0.027874607592821,-0.009875328280032,0.030986446887255,0.010654663667083,0.036930948495865,-0.027174619957805,0.144631281495094,0.097858719527721,-0.018299451097846,0.114427722990513) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.332401573657990,-0.250573217868805,-0.579247534275055,1.034337282180786) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL5
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 2_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.147211030125618,0.225850284099579,-0.135910943150520,0.141632556915283);
res += mat4(0.102323547005653,0.007711009588093,-0.004333207849413,-0.077908359467983,-0.259321063756943,0.045343700796366,0.047697115689516,-0.031589787453413,-0.156654328107834,-0.095778413116932,-0.000093249080237,-0.032075282186270,-0.129667654633522,-0.117422528564930,0.069729320704937,0.084887064993382) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.008566294796765,-0.181866481900215,-0.182237476110458,0.432699352502823,0.309893608093262,0.100568048655987,0.154575735330582,-0.055373404175043,0.179734870791435,0.018425844609737,0.079109340906143,0.261879682540894,-0.013226945884526,-0.020569439977407,-0.062210988253355,0.006051670759916) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.208799824118614,0.039121575653553,-0.240240007638931,-0.028065400198102,0.083151176571846,0.057556159794331,0.185635864734650,-0.103407651185989,-0.047284010797739,0.135004490613937,-0.073641024529934,0.003359385998920,-0.014466941356659,-0.095871478319168,-0.136332958936691,0.102059476077557) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.032849732786417,0.119112893939018,0.011120606213808,-0.259691208600998,-0.074821472167969,0.156458348035812,0.190595388412476,0.039425220340490,-0.228482842445374,-0.220035105943680,-0.130029067397118,0.132064297795296,0.132892504334450,0.130286380648613,0.027950178831816,0.154169067740440) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.021727465093136,-0.148976624011993,-0.247922420501709,0.401860147714615,0.203126147389412,0.809821307659149,-0.259098798036575,0.208753585815430,0.084590643644333,0.128584980964661,-0.046183992177248,0.017750002443790,-0.446883976459503,-0.645267069339752,0.103762000799179,-0.267877161502838) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.127913802862167,-0.033488105982542,0.045911967754364,-0.082426197826862,-0.167868599295616,-0.226645201444626,-0.094944715499878,-0.535429656505585,-0.200796395540237,-0.007685358170420,-0.213570535182953,0.070244222879410,0.328795731067657,0.318850487470627,0.228191107511520,0.531602621078491) * MODEL1_texOff(vec2(0,1));
res += mat4(0.166501536965370,0.040160734206438,-0.016025520861149,0.069657862186432,0.046568974852562,0.026957847177982,-0.219337671995163,0.093313626945019,-0.158314362168312,-0.173521161079407,0.057822782546282,0.039916865527630,-0.029957953840494,-0.058474652469158,-0.042206723242998,-0.068244002759457) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.034462016075850,-0.138851374387741,0.163473591208458,0.024553060531616,-0.069321572780609,-0.114272072911263,-0.243993803858757,0.162426650524139,-0.327871978282928,-0.348876357078552,0.004056572448462,0.223954573273659,0.238851562142372,0.005919987335801,0.045021951198578,0.017196428030729) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.097021177411079,-0.035304799675941,0.038010478019714,-0.031913843005896,-0.056668125092983,-0.038029279559851,-0.238162934780121,-0.184216961264610,-0.026090083643794,0.071637928485870,-0.176890507340431,0.021037306636572,-0.148364394903183,-0.069561474025249,-0.071093149483204,0.127494812011719) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.139876469969749,0.044129513204098,-0.026851732283831,-0.107335262000561,-0.149726361036301,0.139330461621284,-0.010902582667768,-0.017713688313961,-0.036888983100653,-0.218284949660301,0.108734272420406,-0.004109683912247,0.099419556558132,-0.016717370599508,0.013847862370312,-0.086685746908188) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.044721297919750,0.180205091834068,-0.068555705249310,-0.114895924925804,-0.201890811324120,-0.114859260618687,-0.035164237022400,0.017282834276557,-0.306840747594833,-0.847254633903503,0.112405747175217,-0.359603106975555,-0.219203561544418,-0.114618226885796,0.191913619637489,0.468475759029388) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.048495288938284,0.071916408836842,-0.093754924833775,-0.035161327570677,-0.134427338838577,-0.039764523506165,0.072277933359146,-0.004679449368268,0.057089131325483,-0.221816882491112,0.134555473923683,-0.125111535191536,0.011691438034177,-0.163859754800797,-0.096028476953506,0.052956111729145) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.205972135066986,-0.434243589639664,0.006947881076485,0.028826804831624,-0.277826756238937,0.008154614828527,0.028743157163262,-0.171839565038681,-0.049192894250154,-0.122958704829216,0.089074648916721,0.079034350812435,-0.214001849293709,-0.025482622906566,0.078633494675159,-0.082793414592743) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.301451176404953,-0.387738317251205,-0.179353922605515,0.205593511462212,-0.116829365491867,-0.248040735721588,-0.027841983363032,-0.015202837996185,0.125833645462990,-0.585958302021027,0.006195017136633,-0.117682129144669,0.002793482271954,0.071782313287258,-0.190124213695526,-0.333076059818268) * MODEL2_texOff(vec2(0,0));
res += mat4(0.114443160593510,-0.025910103693604,-0.416585445404053,-0.098495513200760,-0.314843833446503,0.073793269693851,0.062893182039261,-0.045284464955330,0.171197339892387,-0.084308497607708,-0.279134541749954,-0.175752073526382,0.119386173784733,0.077959239482880,0.248276695609093,-0.070668302476406) * MODEL2_texOff(vec2(0,1));
res += mat4(0.206217020750046,0.067618340253830,-0.110477782785892,0.115617781877518,-0.150330170989037,0.047288890928030,-0.067494124174118,-0.124823883175850,-0.023694541305304,-0.062403526157141,-0.081657871603966,-0.038784433156252,0.047389537096024,0.052320789545774,0.057945262640715,-0.035877548158169) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.297360956668854,0.191969886422157,0.161350965499878,-0.515076398849487,-0.231321513652802,-0.018051480874419,-0.066701620817184,-0.241959229111671,0.081108860671520,-0.093928657472134,0.025743121281266,-0.017366020008922,0.130204543471336,0.127962008118629,0.126797363162041,-0.241127118468285) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.051705926656723,-0.075964234769344,0.339797526597977,-0.019380545243621,-0.217389807105064,0.122417539358139,0.118643246591091,-0.075407162308693,0.138972386717796,0.050636228173971,-0.146968752145767,-0.119148939847946,0.053414806723595,0.032330293208361,0.204927340149879,-0.114175163209438) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.029124004766345,0.003045309800655,-0.035273443907499,0.001271187560633,0.161286026239395,0.028821606189013,0.016668520867825,-0.015207475982606,0.066220909357071,0.024359721690416,-0.018491379916668,0.024460777640343,0.170760691165924,0.303654164075851,-0.024661378934979,0.091958679258823) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.098688051104546,0.140613749623299,-0.087928213179111,0.021197423338890,-0.039811525493860,-0.011146835982800,0.062215309590101,0.059116058051586,0.102349348366261,-0.041467022150755,-0.017130102962255,-0.116321109235287,0.128839746117592,0.571187019348145,-0.260238826274872,0.319608330726624) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.162660449743271,-0.022106798365712,-0.273492962121964,0.045137796550989,-0.082418903708458,-0.250685274600983,-0.080537535250187,0.013889523223042,-0.028854090720415,-0.000730118714273,-0.023438971489668,-0.057845614850521,0.000768600963056,-0.343496620655060,-0.483600944280624,-0.040679145604372) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.001451940974221,0.001147814211436,-0.146059796214104,-0.013438833877444,0.159475594758987,0.045164007693529,-0.033534470945597,-0.162780553102493,-0.044748533517122,-0.203282535076141,0.081755176186562,0.228850781917572,-0.036449171602726,-0.126329720020294,0.056149661540985,-0.105767473578453) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.211914002895355,0.029642220586538,-0.157290980219841,0.255712509155273,-0.232690334320068,-0.084250897169113,0.040905341506004,0.214835748076439,0.019924882799387,-0.100049398839474,0.180186823010445,-0.086226657032967,0.077430181205273,-0.513342857360840,0.184874102473259,-0.076874159276485) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.040253955870867,0.049856510013342,-0.057786036282778,-0.125667974352837,0.982526302337646,0.298125445842743,-0.300550013780594,0.955876886844635,-0.065211899578571,0.073094777762890,0.038050889968872,0.059507116675377,-0.126490876078606,-0.178743764758110,0.013739163056016,-0.003590441541746) * MODEL3_texOff(vec2(0,1));
res += mat4(0.062007300555706,0.133705765008926,0.054520044475794,0.131710201501846,-0.055450275540352,0.133533686399460,-0.070828318595886,-0.001211461494677,-0.238056451082230,0.126319289207458,0.427519887685776,0.080939434468746,0.124940790235996,-0.043540950864553,0.030472941696644,-0.014868044294417) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.205833762884140,0.203906983137131,0.491162806749344,0.038801755756140,-0.086774826049805,-0.051236409693956,0.025475459173322,-0.101205781102180,-0.223789915442467,-0.132558256387711,0.464249342679977,0.035090267658234,0.059027906507254,-0.002595377154648,0.153739258646965,-0.044811598956585) * MODEL3_texOff(vec2(1,0));
res += mat4(0.004712603520602,0.144307360053062,0.425925433635712,0.122845314443111,-0.273701190948486,0.102308079600334,0.375296413898468,-0.220429062843323,0.005537541583180,0.038366980850697,0.309713184833527,0.062482707202435,-0.009585424326360,-0.050078701227903,0.202079564332962,-0.032150443643332) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.845567464828491,0.206605181097984,-0.163464561104774,0.920310080051422) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.038200907409191,0.100908510386944,-0.068942144513130,0.137779191136360);
res += mat4(-0.100583530962467,0.083631515502930,-0.003997025545686,-0.037016320973635,-0.064373858273029,-0.002311793621629,-0.051576830446720,-0.172638863325119,-0.033041968941689,-0.048393674194813,0.017189210280776,-0.323185026645660,-0.009607417508960,-0.106127180159092,-0.065355017781258,-0.214158520102501) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.075274161994457,-0.077862814068794,0.063572101294994,0.212804719805717,0.052540346980095,-0.202619582414627,-0.029654070734978,-0.124054975807667,0.140892490744591,-0.027065925300121,0.136722356081009,0.097322754561901,0.077538587152958,-0.249047100543976,-0.095058485865593,-0.066928178071976) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.050570409744978,0.020057862624526,0.051647916436195,-0.076297946274281,-0.013590314425528,-0.189549550414085,0.000681682489812,-0.089223064482212,0.073009498417377,-0.016822442412376,0.016086865216494,0.138610601425171,-0.077854357659817,-0.248104140162468,-0.114801585674286,-0.098031468689442) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.042849205434322,0.105182856321335,-0.072513215243816,-0.065333716571331,0.034607958048582,0.059397302567959,-0.039324756711721,-0.361138880252838,0.005787476897240,-0.020640179514885,0.153069540858269,0.056843560189009,-0.054019305855036,-0.022762250155210,0.008267382159829,-0.567430794239044) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.279954910278320,0.184445321559906,-0.466044157743454,0.437355965375900,-0.052637916058302,0.007583205588162,-0.056256603449583,-0.080316670238972,-0.219479218125343,0.316321998834610,-0.086408756673336,-0.002219401998445,-0.082093015313148,-0.217078164219856,0.042321689426899,0.289605557918549) * MODEL1_texOff(vec2(0,0));
res += mat4(0.011763754300773,0.200137853622437,0.016621949151158,-0.034321889281273,-0.106730565428734,-0.227818846702576,0.046659249812365,-1.172435045242310,-0.263770639896393,-0.309288948774338,-0.036545358598232,0.185159981250763,0.204760387539864,-0.168427512049675,0.074991501867771,-0.175334557890892) * MODEL1_texOff(vec2(0,1));
res += mat4(0.179498746991158,0.096416711807251,0.017084969207644,0.120901018381119,0.127088591456413,0.101720616221428,0.007045119535178,-0.115583330392838,-0.017684232443571,-0.115262262523174,0.013809381984174,-0.145626634359360,0.021000873297453,0.005299378186464,0.090037234127522,-0.091114707291126) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.187520906329155,-0.172456741333008,0.291303813457489,-0.186443328857422,0.030016439035535,-0.026375798508525,-0.038056075572968,-0.073692418634892,0.030538599938154,-0.307598263025284,0.120730593800545,-0.030491340905428,0.049266848713160,-0.203878432512283,0.034532554447651,0.081889644265175) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.086742974817753,0.125397190451622,-0.015117323957384,0.003593571716920,0.163270935416222,-0.111297771334648,0.116377912461758,0.048105176538229,0.117449872195721,-0.048107005655766,0.102703049778938,0.065213792026043,0.103502117097378,-0.231005921959877,-0.136349618434906,-0.076355099678040) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.119229190051556,-0.030288254842162,-0.019267495721579,-0.268736630678177,-0.017302768304944,0.081455685198307,0.106364019215107,0.012629858218133,0.087310574948788,-0.028605900704861,0.027865285053849,-0.167616397142410,-0.140465229749680,-0.102884680032730,0.041640963405371,-0.106487840414047) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.060613889247179,0.157774373888969,0.217462465167046,-0.011015504598618,0.029548836871982,0.347943454980850,0.148977369070053,0.005612518172711,-0.015976434573531,-0.025153061375022,-0.010244177654386,-0.060808148235083,-0.148222625255585,0.022976571694016,0.345074921846390,0.152511820197105) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.066081114113331,-0.094200611114502,-0.051414016634226,0.072257861495018,0.074746914207935,0.093189448118210,0.049549069255590,0.194823697209358,0.131210789084435,0.123185619711876,0.120336920022964,0.047211982309818,-0.036367125809193,0.168723359704018,0.085718691349030,0.116836801171303) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.049108769744635,0.117176674306393,-0.095651701092720,-0.067376114428043,-0.122124813497066,0.074699856340885,0.225590750575066,0.255890488624573,0.143737092614174,-0.050516143441200,0.488712310791016,-0.156008720397949,0.102334924042225,0.114365264773369,0.003476768964902,0.133909597992897) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.369513571262360,-0.276053905487061,-0.390962451696396,0.105957128107548,-0.211469322443008,-0.163609921932220,-0.175779238343239,0.151514843106270,0.002341929124668,0.154901847243309,0.408557325601578,0.159488692879677,-0.140779823064804,-0.108695678412914,-0.598550975322723,0.460517048835754) * MODEL2_texOff(vec2(0,0));
res += mat4(0.087248690426350,-0.066854134202003,0.060898244380951,-0.229209110140800,0.278356343507767,0.291414350271225,0.224359884858131,-0.075942270457745,0.122161388397217,-0.117617212235928,0.126533061265945,-0.219968900084496,0.004789367783815,0.198454156517982,0.019012318924069,-0.243133321404457) * MODEL2_texOff(vec2(0,1));
res += mat4(0.416273772716522,0.030552592128515,0.083267614245415,0.030037330463529,-0.216302901506424,-0.205976694822311,-0.041811019182205,0.252844423055649,-0.309953421354294,0.069096386432648,0.027140004560351,-0.007314603310078,0.307449817657471,0.183687224984169,0.119311943650246,-0.075691871345043) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.315667152404785,0.252397805452347,0.130131334066391,-0.077507227659225,0.150592237710953,0.498506247997284,0.372125715017319,-0.031670443713665,-0.268314987421036,-0.058451220393181,0.030157923698425,0.064241118729115,0.375816047191620,-0.400958001613617,-0.125031650066376,-0.163841143250465) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.015603266656399,-0.052568167448044,0.039254359900951,-0.089279085397720,-0.084859311580658,0.208964437246323,-0.029262660071254,-0.263213306665421,-0.048807386308908,-0.024632249027491,0.077262222766876,-0.052134111523628,0.139541819691658,0.236590936779976,0.093025796115398,-0.159974575042725) * MODEL2_texOff(vec2(1,1));
res += mat4(0.001376598956995,0.049449592828751,-0.013211466372013,0.031100103631616,0.000896972313058,0.066495135426521,0.006265747826546,0.144673615694046,0.027137743309140,0.159182921051979,0.193352147936821,0.040902432054281,0.013737076893449,0.004472851287574,0.094069659709930,-0.000525595678482) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.067471884191036,0.094452001154423,0.055054735392332,0.009928455576301,-0.001254108035937,-0.084600411355495,-0.084627442061901,0.109875284135342,0.063057072460651,0.303339987993240,0.182565450668335,-0.078144825994968,0.081596598029137,-0.019360048696399,0.169711828231812,-0.128562763333321) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.018311595544219,0.020961649715900,-0.029533078894019,0.004185023717582,-0.034881919622421,-0.159334629774094,-0.141253829002380,-0.041304156184196,-0.098697066307068,-0.047905143350363,-0.052620735019445,0.070300780236721,-0.016405517235398,-0.259587496519089,-0.030585004016757,0.072757504880428) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.011586834676564,0.067608006298542,-0.038235586136580,-0.037153791636229,0.203576594591141,-0.163887828588486,0.073440112173557,0.122498892247677,0.017698301002383,0.128502056002617,-0.453249454498291,0.203315451741219,-0.083859570324421,-0.020408095791936,-0.099595062434673,-0.008602133020759) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.045538634061813,-0.099550224840641,-0.095368675887585,0.136628061532974,0.547607064247131,0.606240391731262,0.289921104907990,-0.010853219777346,-0.125116154551506,0.376742899417877,-0.042726419866085,-0.006775052286685,-0.151502102613449,0.210286602377892,-0.194761276245117,-0.029578410089016) * MODEL3_texOff(vec2(0,0));
res += mat4(0.091111682355404,-0.004564491566271,-0.011934049427509,0.070632860064507,-0.000059072164731,0.022743890061975,0.112250819802284,-0.062637656927109,-0.084047630429268,0.068240903317928,-0.103867806494236,0.056342836469412,-0.066654935479164,-0.733720064163208,-0.008492485620081,-0.057212259620428) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.129485249519348,0.172944679856300,-0.027283405885100,-0.058507919311523,-0.037631947547197,-0.101958699524403,-0.033455945551395,-0.057301945984364,-0.363976359367371,-0.155627340078354,0.148801997303963,0.037586927413940,0.087545558810234,0.042054608464241,-0.035109322518110,-0.084230184555054) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.032561738044024,0.038530290126801,0.047347463667393,-0.015378999523818,-0.074509114027023,-0.270068734884262,-0.334432244300842,-0.096555143594742,-0.153520479798317,-0.114332862198353,-0.227659314870834,0.136517003178596,-0.102131538093090,-0.154952362179756,0.121619746088982,-0.198329403996468) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.093000993132591,-0.096221745014191,-0.172660395503044,0.092972978949547,0.047702129930258,-0.070623219013214,-0.012277095578611,-0.021815273910761,-0.038488205522299,-0.048893127590418,0.001570463413373,0.053221315145493,-0.063032411038876,0.010820650495589,0.125252276659012,0.112986318767071) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.243328630924225,0.632436752319336,-0.201679989695549,0.417706161737442) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL6
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 2_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.045881494879723,0.146403133869171,-0.129501044750214,0.072141371667385);
res += mat4(-0.060538463294506,-0.376681834459305,-0.017892738804221,0.098079696297646,0.011176338419318,0.399397283792496,-0.006129640154541,-0.180135026574135,-0.090362511575222,0.054813459515572,0.017417121678591,0.008668922819197,-0.004869703669101,-0.112020485103130,0.010088638402522,0.044628344476223) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.031984500586987,0.173930853605270,0.025037173181772,0.034299775958061,-0.276614785194397,-0.020066505298018,-0.169653445482254,-0.174876824021339,0.008491693995893,-0.070242859423161,0.034768376499414,0.116447798907757,-0.008127596229315,-0.066804111003876,0.006140829995275,-0.005321705713868) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.102033101022243,0.024465050548315,0.147438287734985,-0.076167911291122,-0.258673876523972,-0.042472735047340,0.034889385104179,0.077630408108234,0.209197849035263,-0.082732453942299,0.163088127970695,0.161082178354263,0.076006978750229,0.070238821208477,-0.149197772145271,0.015011883340776) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.056108683347702,-0.100417897105217,-0.020687937736511,0.107776165008545,0.059940651059151,0.245237067341805,0.202850326895714,0.128997579216957,-0.258063733577728,0.277131140232086,-0.034708388149738,-0.076296187937260,0.145328849554062,-0.534708917140961,0.034804027527571,-0.092142365872860) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.496412277221680,0.075129628181458,0.196394771337509,-0.022309120744467,0.296155005693436,-0.321689933538437,-0.228867307305336,-0.229516714811325,0.260225206613541,-0.131086632609367,-0.113433234393597,-0.311780691146851,-0.055336795747280,0.382022529840469,-0.024496523663402,0.353138893842697) * MODEL1_texOff(vec2(0,0));
res += mat4(0.219676151871681,-0.049854055047035,0.186969056725502,0.156184241175652,-0.221085861325264,0.032438367605209,-0.099274307489395,-0.091518394649029,-0.246931597590446,0.192940428853035,-0.175747632980347,-0.104372777044773,-0.216155812144279,0.132595121860504,-0.045526582747698,-0.083720810711384) * MODEL1_texOff(vec2(0,1));
res += mat4(0.007323993369937,0.041145823895931,-0.067941270768642,0.003784733824432,-0.121497355401516,-0.023040138185024,0.163826748728752,0.074292756617069,-0.038884963840246,0.089582726359367,0.186825513839722,0.158680468797684,0.060932688415051,-0.059711076319218,0.083338432013988,-0.168676480650902) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.004267727956176,-0.078335054218769,-0.550414502620697,0.035494949668646,-0.158486619591713,-0.081065498292446,-0.039642911404371,0.130804449319839,0.207512065768242,0.003871571505442,0.045954160392284,-0.084343068301678,0.043906409293413,-0.130183205008507,0.067121669650078,-0.293220847845078) * MODEL1_texOff(vec2(1,0));
res += mat4(0.159907639026642,0.008578875102103,-0.247879043221474,0.063125111162663,0.078731410205364,0.102618455886841,0.053990017622709,0.089410409331322,0.118904642760754,-0.104947254061699,0.035899177193642,-0.131600856781006,0.104282908141613,0.007759686559439,0.010192611254752,0.102955579757690) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.099474884569645,-0.084411554038525,0.041851349174976,0.136489287018776,0.078449644148350,-0.085807286202908,0.010346161201596,-0.083528548479080,-0.048878069967031,-0.060253947973251,0.021003210917115,0.013954044319689,0.069298081099987,-0.004189400468022,-0.013967865146697,-0.074565500020981) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.247120738029480,0.003899141447619,-0.089241683483124,0.266080170869827,0.009326454252005,0.049755156040192,0.021366626024246,-0.136309042572975,-0.186019435524940,-0.030777798965573,0.046674489974976,0.213186725974083,0.164468020200729,-0.016004381701350,0.006927327718586,-0.184104442596436) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.131997406482697,-0.031120749190450,0.062433850020170,-0.029430579394102,-0.111191742122173,0.019508777186275,0.024095924571157,-0.210358753800392,-0.235080525279045,-0.031808163970709,0.093722209334373,-0.020939650014043,0.147882401943207,0.085544422268867,-0.021664572879672,0.069940060377121) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.077465154230595,-0.167893305420876,-0.013436452485621,-0.012224109843373,0.071626216173172,0.011728239245713,-0.065798915922642,-0.126040548086166,0.006820889655501,0.027858497574925,-0.009851541370153,0.098506651818752,-0.017752083018422,-0.265397965908051,0.098335422575474,0.402166992425919) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.146759226918221,-0.043867841362953,-0.071730248630047,-0.004769873339683,-0.007898197509348,0.016452617943287,-0.034146107733250,-0.248662918806076,-0.208091437816620,-0.028183009475470,0.148305952548981,0.136960774660110,0.107174135744572,0.046446714550257,0.124855361878872,0.027546986937523) * MODEL2_texOff(vec2(0,0));
res += mat4(0.178806275129318,0.145911708474159,-0.200755000114441,0.085559464991093,0.145239442586899,0.015386704355478,-0.109899662435055,-0.202757313847542,-0.203708514571190,0.038652203977108,-0.044852893799543,-0.126014560461044,-0.431960493326187,0.060544863343239,0.038692995905876,-0.166523978114128) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.024201918393373,-0.014148823916912,0.418324559926987,0.074958860874176,-0.005183069035411,0.004562938585877,0.071242317557335,-0.174457877874374,-0.017998825758696,0.022469706833363,0.143725395202637,0.074274674057961,-0.004566054325551,-0.148983597755432,-0.066755995154381,-0.045228224247694) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.230959236621857,-0.054534602910280,0.156421735882759,-0.578293204307556,0.103689230978489,-0.001448853756301,-0.113795183598995,-0.339914649724960,-0.056765332818031,-0.039126034826040,0.182493045926094,-0.156419277191162,0.060966268181801,-0.010292593389750,-0.215795993804932,-0.006694295443594) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.239428400993347,0.010188939981163,-0.363213628530502,0.371090710163116,0.094426579773426,0.065677791833878,0.085779063403606,-0.288132220506668,-0.074706263840199,0.028381576761603,-0.050599854439497,-0.039857625961304,-0.245644718408585,0.026788905262947,0.034501217305660,-0.066080421209335) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.078243397176266,-0.099908031523228,0.055220481008291,0.138967424631119,0.055606588721275,0.205372974276543,0.034990709275007,0.035777144134045,-0.180484205484390,-0.045304071158171,0.122287377715111,0.147074550390244,0.222855210304260,0.137401357293129,0.093448169529438,0.065032616257668) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.152916759252548,-0.064431339502335,-0.048996366560459,0.097845271229744,0.012071374803782,-0.072107776999474,-0.087175808846951,0.162790745496750,-0.129558935761452,-0.002411311026663,-0.052615609019995,0.053362838923931,-0.107586897909641,-0.181060954928398,-0.093378543853760,-0.124619387090206) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.067122660577297,-0.019968032836914,-0.107390500605106,-0.369775027036667,-0.046262543648481,0.014718505553901,-0.053715098649263,0.027625735849142,-0.050716090947390,-0.014050098136067,0.001815287978388,-0.022881133481860,-0.108724474906921,0.135821908712387,-0.209330916404724,0.018633449450135) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.051550921052694,-0.370506346225739,0.102703839540482,-0.213561981916428,-0.075172662734985,0.695822775363922,0.089268051087856,0.242855623364449,-0.000178895235877,-0.024804888293147,0.078868627548218,-0.114985004067421,-0.131494194269180,-0.074316896498203,-0.044322058558464,-0.202071011066437) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.041940398514271,0.254172027111053,0.253779113292694,0.021259587258101,0.156871244311333,-0.228794634342194,-0.173442721366882,-0.326557576656342,0.030107503756881,0.017067942768335,0.206079214811325,0.173876136541367,-0.215775907039642,0.037095181643963,-0.078050196170807,0.365005314350128) * MODEL3_texOff(vec2(0,0));
res += mat4(0.298980116844177,-0.168737962841988,0.581987798213959,0.297910064458847,-0.506643235683441,0.019570617005229,0.127637162804604,-0.186767905950546,0.204706445336342,-0.007113275118172,0.212828502058983,-0.085203856229782,0.032275043427944,-0.018621914088726,-0.038551013916731,-0.117018856108189) * MODEL3_texOff(vec2(0,1));
res += mat4(0.067911937832832,-0.052133277058601,0.083331562578678,-0.512251377105713,-0.094815522432327,0.152722150087357,-0.000610796734691,-0.126687541604042,-0.136928290128708,0.034405592828989,0.165927395224571,0.123994745314121,0.001211865688674,0.014981877990067,0.059365037828684,-0.160364180803299) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.040640581399202,0.063912473618984,-0.069916218519211,-0.403260111808777,-0.164064854383469,-0.045093048363924,-0.089341789484024,-0.065575391054153,-0.407599925994873,-0.082470931112766,-0.003260342171416,-0.032485056668520,0.080830402672291,-0.019643601030111,0.035321004688740,-0.112545847892761) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.012042751535773,0.008607125841081,-0.500836730003357,0.184899494051933,0.035988654941320,0.089157953858376,-0.340513288974762,0.015828689560294,-0.103753283619881,0.009070829488337,0.194519847631454,0.129450961947441,0.032003045082092,0.006463448051363,-0.290848433971405,-0.056050729006529) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.900450706481934,-0.371820241212845,-0.387445211410522,-0.255162596702576) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.185154691338539,-0.009424282237887,-0.095841839909554,0.012891404330730);
res += mat4(-0.008818319067359,-0.029144348576665,0.017790790647268,0.008316735737026,0.085484206676483,-0.035292789340019,-0.013485494069755,0.024908583611250,0.002473127562553,-0.056399192661047,0.076462693512440,-0.209152981638908,0.064142175018787,0.073044821619987,0.003569047898054,0.022413302212954) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.026761891320348,-0.041333436965942,-0.040245946496725,0.327939450740814,0.039992991834879,0.064149104058743,0.076719775795937,-0.028421260416508,-0.196007877588272,0.187181413173676,-0.076437301933765,0.027280816808343,0.020053777843714,0.403860211372375,-0.091462776064873,-0.003195703960955) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.037994481623173,0.068812489509583,0.019719736650586,-0.096921227872372,0.092085748910904,-0.003685885807499,0.024066703394055,0.119533933699131,-0.047756697982550,0.054452791810036,-0.018922176212072,-0.091758087277412,-0.041482612490654,0.101947970688343,-0.114478543400764,-0.017353050410748) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.269061446189880,-0.013631789945066,0.288607925176620,-0.365944713354111,0.204534888267517,-0.205074772238731,0.033405229449272,-0.104307726025581,0.057502619922161,-0.015913343057036,0.037391699850559,0.096365191042423,0.053302384912968,0.089231468737125,0.338344246149063,-0.153386294841766) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.294083923101425,-0.047298047691584,-0.501090705394745,-0.124746002256870,-0.157917425036430,0.015531512908638,-0.017631275579333,0.080374673008919,0.072814755141735,0.061449714004993,0.185696646571159,-0.205464139580727,0.096595644950867,0.581221044063568,-0.146102145314217,-0.007728898432106) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.073315531015396,0.060175221413374,0.275671809911728,0.371011674404144,-0.132424533367157,-0.046122673898935,0.256408214569092,-0.054181702435017,0.047857765108347,-0.000906007422600,-0.295301079750061,-0.125571608543396,0.379799425601959,-0.119301401078701,-0.107509791851044,0.294204354286194) * MODEL1_texOff(vec2(0,1));
res += mat4(0.047326616942883,0.068643562495708,0.150179430842400,0.108724236488342,0.112800031900406,-0.007414235733449,0.011919721961021,-0.057882554829121,0.260362982749939,-0.117208577692509,-0.113216526806355,0.246437385678291,0.040384043008089,0.074896328151226,0.143906310200691,-0.099886730313301) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.031588640064001,0.054869543761015,-0.168958768248558,-0.145977020263672,-0.069410525262356,0.021640148013830,-0.154628232121468,0.037442099303007,0.113141655921936,0.178451284766197,0.093939341604710,-0.034566812217236,0.200868621468544,0.295534580945969,-0.051624376326799,-0.065725259482861) * MODEL1_texOff(vec2(1,0));
res += mat4(0.107093863189220,-0.048128627240658,-0.028977164998651,-0.048936840146780,-0.144519165158272,-0.073006860911846,0.205004468560219,-0.152823939919472,-0.057264033704996,0.064381659030914,-0.057809561491013,-0.203384548425674,-0.383018374443054,0.090347088873386,-0.153187036514282,-0.150067716836929) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.024472869932652,-0.005265734624118,0.141495659947395,0.232784509658813,-0.215298354625702,-0.032682184129953,-0.197527199983597,-0.067420490086079,-0.287612527608871,0.042148388922215,0.019521143287420,-0.054552737623453,-0.068927213549614,-0.025580922141671,0.027596158906817,0.012720132246614) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.151063591241837,0.515785396099091,0.011578583158553,0.396824002265930,-0.157181456685066,-0.044573318213224,0.129566907882690,-0.159688323736191,-0.182782039046288,0.292169034481049,-0.026397982612252,-0.096581265330315,0.076722346246243,0.128202766180038,-0.027581710368395,0.127645462751389) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.049112975597382,-0.006788000930101,0.024572962895036,-0.149452880024910,0.102920748293400,-0.015617547556758,0.076294302940369,-0.002536979503930,-0.082164973020554,-0.015803929418325,0.148146435618401,0.134980767965317,0.080188535153866,-0.049561832100153,0.052656028419733,0.093299061059952) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.084714159369469,0.000648101384286,0.039743650704622,-0.249272257089615,-0.101660095155239,0.137351408600807,-0.002253195969388,0.123514458537102,-0.115966871380806,-0.172469511628151,-0.007010118570179,-0.047583278268576,0.400211304426193,0.001316084759310,-0.301443874835968,-0.320390343666077) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.045964997261763,0.131694883108139,-0.325960367918015,0.015394160524011,0.016182273626328,-0.130429819226265,0.232510656118393,0.036015022546053,-0.174750357866287,-0.260974228382111,0.187260389328003,-0.064854383468628,0.720812201499939,-0.152594983577728,-0.396387964487076,-0.456190526485443) * MODEL2_texOff(vec2(0,0));
res += mat4(0.050203751772642,-0.161195844411850,0.035464651882648,0.357296407222748,-0.106914572417736,0.153701007366180,0.105712167918682,0.249743655323982,-0.091483458876610,-0.091599926352501,-0.069910176098347,0.052453260868788,0.096238017082214,0.169659286737442,0.550431191921234,0.319215536117554) * MODEL2_texOff(vec2(0,1));
res += mat4(0.095966577529907,-0.003555519506335,-0.132898613810539,-0.299901098012924,-0.043921552598476,0.117168664932251,-0.028522215783596,0.050300579518080,0.054704885929823,-0.033303890377283,-0.093645267188549,0.038471348583698,0.053786080330610,-0.133710429072380,-0.076856657862663,0.235986620187759) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.060440901666880,-0.211157560348511,0.005431242752820,-0.370991826057434,0.233119010925293,-0.048687219619751,0.206373929977417,-0.328164786100388,0.242961198091507,0.063844032585621,0.012949814088643,0.049645636230707,-0.653292477130890,-0.074247673153877,-0.081762209534645,-0.277182549238205) * MODEL2_texOff(vec2(1,0));
res += mat4(0.105245657265186,0.052024655044079,0.106530010700226,0.384598016738892,0.092974677681923,-0.165868148207664,0.116635531187057,0.288062602281570,0.039280045777559,0.002753490116447,-0.009123163297772,-0.046426437795162,0.201976552605629,-0.096261881291866,0.097312361001968,0.072298668324947) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.002085230313241,-0.028772488236427,-0.050086066126823,-0.050325926393270,0.055983465164900,0.122610688209534,0.041909832507372,-0.089083217084408,0.183363750576973,-0.186402007937431,-0.212010741233826,0.208629772067070,0.033937186002731,0.140579611063004,0.027614278718829,-0.060110352933407) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.006497339811176,0.051120910793543,-0.016468057408929,0.081353142857552,0.305625885725021,-0.248868107795715,0.027795596048236,-0.072024114429951,-0.088180646300316,-0.074453413486481,0.377564787864685,-0.078098110854626,0.023469794541597,-0.002495884895325,0.061864379793406,-0.069111540913582) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.012227306142449,0.024015706032515,0.052330151200294,-0.016094785183668,0.210663467645645,-0.171954795718193,-0.081236533820629,0.260302603244781,0.015857158228755,-0.008609431795776,-0.052183683961630,-0.022617684677243,0.119568809866905,0.316139817237854,-0.151049017906189,-0.160978958010674) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.055281993001699,-0.120117574930191,0.028123402968049,-0.056490845978260,-0.044072989374399,0.272506833076477,-0.212539941072464,0.215400233864784,0.494935572147369,-0.148824259638786,-0.427572458982468,-0.120001733303070,0.072504222393036,0.104560412466526,-0.265404254198074,0.121725320816040) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.024243090301752,-0.000691308756359,-0.072395183146000,0.077517524361610,0.288604378700256,-0.241286054253578,-0.050746005028486,-0.377451568841934,0.207843855023384,-0.317920565605164,0.124013438820839,-0.005609089508653,-0.226860031485558,-0.052694693207741,0.313305616378784,-0.224872395396233) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.072885625064373,-0.026612263172865,-0.023033380508423,-0.035187277942896,0.001700274762698,-0.269311934709549,0.144180983304977,-0.068900190293789,-0.025590036064386,-0.111352741718292,-0.007161285728216,-0.021233279258013,-0.089519366621971,0.437473714351654,-0.248955875635147,-0.035348638892174) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.210231035947800,-0.126390755176544,0.130105808377266,-0.115149416029453,0.082984022796154,-0.097455933690071,0.067614294588566,-0.048142734915018,0.023629888892174,0.137201994657516,-0.197911277413368,0.105374611914158,0.041947923600674,0.042697384953499,0.081079885363579,-0.000252343364991) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.256262779235840,0.346988469362259,0.011861340142787,0.274242579936981,-0.024356031790376,0.097214221954346,0.035443451255560,0.154053017497063,0.177163645625114,0.151161387562752,-0.052246704697609,-0.169378310441971,0.013414863497019,0.342917293310165,-0.025562968105078,-0.024797610938549) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.051338862627745,0.176414802670479,-0.142221018671989,-0.157286509871483,0.013383165933192,0.034419193863869,-0.025324178859591,0.000916267046705,0.093283988535404,0.006808260921389,-0.093202754855156,-0.040521714836359,0.046127025038004,0.127625003457069,0.090443052351475,-0.097373306751251) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.858815133571625,-0.362286031246185,-0.045612655580044,-0.573267757892609) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL1
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 3_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.177704080939293,0.011282077990472,0.000118852825835,-0.115640722215176);
res += mat4(-0.034081384539604,0.019225271418691,-0.022003866732121,-0.046397585421801,0.028399191796780,0.007997908629477,-0.096046693623066,0.055169183760881,-0.006465725600719,-0.131261244416237,0.008733220398426,0.001226815162227,-0.067210122942924,0.035902194678783,0.003665979020298,0.063303656876087) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.056986931711435,0.043289110064507,-0.124546580016613,0.140068069100380,0.061932999640703,-0.085901379585266,0.029686974361539,-0.065606892108917,-0.060222212225199,0.052991487085819,-0.140081778168678,-0.015134345740080,-0.019487828016281,0.014505106024444,-0.061489518731833,0.115677304565907) * MODEL4_texOff(vec2(-1,0));
res += mat4(0.058962509036064,-0.056060325354338,-0.005497062113136,0.066519290208817,-0.001485658925958,0.093157455325127,-0.034282129257917,-0.043856527656317,-0.066992275416851,-0.212340250611305,-0.004781484138221,0.084901489317417,-0.015826361253858,-0.221883982419968,0.147382289171219,-0.013325358740985) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.175872787833214,-0.092716954648495,-0.059117164462805,-0.189604550600052,-0.195319965481758,-0.204876050353050,0.074097901582718,-0.053804468363523,0.175216972827911,-0.247004777193069,-0.067808456718922,-0.131700694561005,-0.139210730791092,0.354819238185883,0.073937669396400,-0.028120556846261) * MODEL4_texOff(vec2(0,-1));
res += mat4(0.194710180163383,0.149096384644508,-0.039352644234896,-0.227555871009827,0.073613844811916,0.265672504901886,-0.148684084415436,0.079615198075771,-0.113357424736023,-0.113710284233093,0.321971684694290,-0.066567465662956,0.081970289349556,-0.129758253693581,-0.029619539156556,0.196517735719681) * MODEL4_texOff(vec2(0,0));
res += mat4(-0.133534461259842,-0.294586300849915,-0.083253063261509,0.057343903928995,0.059435848146677,-0.079619728028774,-0.108064852654934,0.004509204998612,-0.137431651353836,-0.252655148506165,0.305752038955688,-0.072953850030899,-0.071302466094494,0.001244528801180,0.157602369785309,-0.100295990705490) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.025660132989287,-0.176614165306091,-0.017500417307019,-0.158158794045448,-0.081746362149715,-0.058851394802332,-0.076327919960022,0.017316639423370,0.134409189224243,0.209428265690804,-0.066224791109562,0.097471535205841,-0.036247871816158,-0.088634401559830,-0.151651784777641,0.113884128630161) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.141033023595810,0.013378920964897,-0.145635902881622,0.203525215387344,-0.063362188637257,0.223500937223434,0.134870901703835,0.027114493772388,0.086627297103405,-0.193979337811470,-0.171145200729370,0.099694676697254,0.122449167072773,0.209835037589073,0.245322585105896,0.459246635437012) * MODEL4_texOff(vec2(1,0));
res += mat4(0.068253003060818,-0.232688903808594,-0.328544735908508,-0.111963771283627,0.049915999174118,0.006402230821550,0.007353980559856,0.009916388429701,0.015949020162225,0.010970814153552,-0.290599018335342,-0.142542228102684,-0.068683072924614,0.320251077413559,-0.195642471313477,0.103676341474056) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.056796949356794,-0.045007072389126,0.115983396768570,-0.034094925969839,0.187734842300415,0.002254052087665,0.033650122582912,0.023125872015953,0.194718703627586,-0.005706585943699,-0.120146974921227,0.270923942327499,0.046126700937748,-0.045218300074339,0.032759536057711,0.093549638986588) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.052850633859634,0.138763979077339,0.138101905584335,0.059899937361479,-0.039874907582998,-0.089017197489738,0.159066781401634,-0.494538456201553,0.009442840702832,0.004367456771433,-0.137560099363327,0.095259070396423,0.106749251484871,-0.116683870553970,-0.036007992923260,0.078693263232708) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.073799684643745,-0.091484084725380,0.041996210813522,0.038921449333429,-0.115220107138157,-0.086924083530903,0.106335528194904,0.055202394723892,-0.007402466144413,-0.078831076622009,-0.054911911487579,0.028912063688040,-0.002382057253271,-0.125075891613960,0.118006840348244,-0.025234131142497) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.052847560495138,0.326818257570267,-0.151136726140976,-0.173994749784470,0.078599855303764,0.439746022224426,0.094896942377090,-0.014126953668892,-0.079423591494560,0.125906318426132,-0.198590219020844,-0.146721318364143,0.609247028827667,0.340606331825256,0.084973730146885,0.280450940132141) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.079013839364052,-0.668333411216736,-0.220399111509323,-0.645711362361908,-0.258957803249359,-0.278575390577316,-0.128538489341736,-0.131028398871422,0.109589345753193,-0.110380575060844,-0.024950578808784,0.241445705294609,-0.257926613092422,0.076499439775944,0.515987873077393,-0.053409390151501) * MODEL5_texOff(vec2(0,0));
res += mat4(0.048223100602627,0.015025155618787,0.054048527032137,-0.118436701595783,-0.214504435658455,-0.500024139881134,-0.272604674100876,0.159387007355690,-0.005839634221047,-0.017162134870887,-0.100077040493488,0.020651625469327,-0.036393612623215,0.114038795232773,0.352925866842270,0.089346207678318) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.173181504011154,0.128978684544563,0.082997672259808,-0.128557786345482,0.003959233406931,0.059422101825476,0.031527042388916,0.110044755041599,0.071735195815563,0.402108043432236,0.366204142570496,0.287498444318771,0.170898720622063,0.355751633644104,-0.060689676553011,-0.023673437535763) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.086699627339840,-0.042344123125076,-0.105745837092400,-0.113154187798500,0.147143751382828,0.463481485843658,0.081008188426495,0.814640581607819,-0.046034529805183,0.121549136936665,0.555447936058044,0.100091278553009,-0.010947558097541,-0.084450766444206,-0.423173457384109,-0.369034111499786) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.098272375762463,0.015629224479198,-0.152193889021873,0.100842349231243,-0.076856434345245,-0.112277284264565,0.017576977610588,-0.038323946297169,0.044548485428095,0.038091342896223,0.142158523201942,0.023162830621004,-0.077749639749527,0.078656889498234,-0.322407186031342,-0.049872949719429) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.136385396122932,-0.039151359349489,-0.044966395944357,0.130173191428185,-0.045410513877869,-0.062522664666176,0.025536008179188,0.020519463345408,-0.257389634847641,0.107129588723183,0.168685421347618,0.336911559104919,0.034448437392712,-0.038957871496677,-0.037740137428045,-0.028326964005828) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.212534680962563,-0.132748425006866,-0.010034928098321,0.087777152657509,-0.330886155366898,-0.076834745705128,-0.047878049314022,0.162978470325470,0.024247677996755,0.149077445268631,-0.158490136265755,0.188779339194298,-0.011747724376619,0.203154414892197,0.093212828040123,-0.144134312868118) * MODEL6_texOff(vec2(-1,0));
res += mat4(0.000550045631826,0.054323811084032,0.017815202474594,0.026116283610463,0.001366947544739,-0.145072683691978,0.020659664645791,-0.181308850646019,0.068209141492844,0.059228658676147,-0.013559503480792,0.196119368076324,-0.076761260628700,0.150754988193512,0.063650466501713,-0.075740814208984) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.445302933454514,-0.036445453763008,0.108805418014526,0.152978688478470,0.007366287056357,-0.206505283713341,-0.037253115326166,0.025781229138374,-0.055270161479712,-0.172299638390541,0.267724215984344,0.079299174249172,0.133524224162102,-0.074281662702560,-0.036624208092690,0.043038487434387) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.104845210909843,-0.061441186815500,-0.258843749761581,-0.414124935865402,-0.928816616535187,0.247950509190559,0.134635820984840,-0.024695675820112,0.065607927739620,0.210206344723701,0.194310218095779,-0.028454175218940,-0.072636336088181,0.340183913707733,-0.106290549039841,0.210473492741585) * MODEL6_texOff(vec2(0,0));
res += mat4(0.011927877552807,-0.110324017703533,-0.145549565553665,-0.033636357635260,0.133900910615921,-0.431036621332169,-0.038750663399696,0.124037995934486,0.054446842521429,0.132067427039146,0.195064872503281,0.077059492468834,-0.124971948564053,0.296972274780273,-0.181122198700905,-0.065879814326763) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.094459407031536,-0.082745619118214,-0.317944169044495,-0.029183495789766,-0.007068033330142,-0.008243781514466,-0.021949695423245,0.009533495642245,-0.030651258304715,0.020166354253888,0.209154188632965,0.225234821438789,-0.126038208603859,0.018993696197867,-0.005874687340111,-0.017721373587847) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.014824779704213,-0.091897971928120,-0.060232028365135,0.134793102741241,-0.211810648441315,-0.057473678141832,-0.141270533204079,-0.037361893802881,0.013571013696492,0.044423438608646,0.219085350632668,0.123509123921394,-0.061211884021759,0.011586776934564,0.069495402276516,-0.163932070136070) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.021933004260063,-0.014419171959162,0.045468993484974,0.057673383504152,-0.044573541730642,-0.137360543012619,-0.040785003453493,-0.033081151545048,0.039752852171659,0.020935570821166,0.310555338859558,-0.001685554627329,0.033897381275892,0.162932574748993,-0.003869931213558,-0.245748311281204) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.195181936025620,0.550405263900757,-0.476365029811859,0.536177635192871) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.115292735397816,-0.140384182333946,0.007932023145258,-0.133252024650574);
res += mat4(0.188884064555168,0.043713707476854,0.136460632085800,0.017964601516724,-0.053455390036106,-0.259571403264999,-0.047414191067219,0.058933734893799,-0.078334532678127,-0.026354521512985,-0.031945314258337,-0.014238125644624,-0.064227201044559,-0.050153143703938,0.023558758199215,0.007330449298024) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.093383081257343,0.110827311873436,0.055246002972126,-0.224171012639999,0.292416960000992,0.118371658027172,0.058853730559349,0.113481365144253,0.024062154814601,-0.016669349744916,-0.050061531364918,-0.002827698597685,0.280704379081726,0.031235333532095,-0.041472867131233,0.061539541929960) * MODEL4_texOff(vec2(-1,0));
res += mat4(0.216741800308228,-0.472263306379318,-0.030313124880195,0.165860116481781,0.111444585025311,-0.010651051066816,0.008806745521724,-0.113205045461655,0.052750270813704,-0.046629715710878,-0.068866088986397,-0.025910533964634,0.079584866762161,-0.041908282786608,-0.047579899430275,0.014807032421231) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.104847207665443,0.117693431675434,0.063481509685516,-0.057690933346748,0.230685800313950,-0.269429236650467,-0.011513800360262,-0.053793925791979,0.084423072636127,-0.039070524275303,-0.156319186091423,-0.020722746849060,0.201052933931351,0.062229510396719,-0.218394026160240,-0.040752038359642) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.862140476703644,0.393359065055847,0.304242283105850,-0.591384589672089,-0.336718887090683,-0.205717995762825,-0.204543098807335,-0.171649277210236,-0.089472234249115,0.103180669248104,-0.101769812405109,-0.103304393589497,-0.269034236669540,0.282337367534637,-0.068314954638481,0.694455802440643) * MODEL4_texOff(vec2(0,0));
res += mat4(-0.408961474895477,-0.494473010301590,-0.384855151176453,-0.132529005408287,0.059174235910177,0.137452259659767,0.265354454517365,0.097851745784283,0.018439877778292,0.046293247491121,-0.024724317714572,-0.036327991634607,-0.054073579609394,0.002217060653493,-0.023123998194933,-0.041574280709028) * MODEL4_texOff(vec2(0,1));
res += mat4(0.150859281420708,0.056709814816713,-0.019784107804298,0.124545179307461,0.122584432363510,0.368106722831726,-0.245751246809959,0.104954488575459,0.066206850111485,0.003005223814398,-0.171143889427185,0.041805513203144,-0.043863881379366,0.022630624473095,-0.098862536251545,-0.073589123785496) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.062567822635174,-0.039219606667757,0.036399994045496,0.019741313531995,0.146378442645073,-0.115969784557819,0.134162634611130,0.243371382355690,-0.059167571365833,-0.079389944672585,-0.034691270440817,-0.005694769788533,-0.056077461689711,-0.070508651435375,-0.246090441942215,-0.199304640293121) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.104602202773094,0.076839148998260,0.057811919599771,0.129645183682442,0.174543857574463,0.143239036202431,0.059834063053131,-0.059908553957939,0.280252337455750,-0.037654981017113,0.039577815681696,-0.007043255958706,0.181335702538490,0.177246227860451,-0.041099935770035,0.073161132633686) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.050396639853716,-0.018401907756925,0.143992662429810,0.080742120742798,-0.074710249900818,0.054490305483341,-0.065773598849773,-0.063721142709255,0.139738008379936,0.046410080045462,-0.088934667408466,0.075939282774925,-0.010766176506877,0.029245128855109,-0.006026412360370,0.088593192398548) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.284923166036606,0.174155369400978,-0.223265275359154,0.205311462283134,0.143348664045334,-0.031130086630583,-0.200070440769196,-0.015664912760258,0.236186474561691,-0.311972618103027,0.300539076328278,0.007186580915004,0.245969966053963,0.200772643089294,0.148738890886307,0.144908607006073) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.002320570871234,-0.023367697373033,0.050907086580992,0.164038240909576,-0.143303856253624,-0.008193273097277,-0.231598690152168,0.160948678851128,-0.149730235338211,-0.068709686398506,0.007505970075727,0.009660787880421,0.038278751075268,-0.109213232994080,0.212616398930550,-0.117418579757214) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.235252693295479,0.105140320956707,-0.136411413550377,0.100238382816315,-0.132151082158089,-0.060484308749437,-0.035549379885197,-0.151696234941483,0.353152543306351,-0.170189753174782,0.087695911526680,-0.136480733752251,0.353787928819656,-0.164767518639565,0.530356287956238,-0.163704812526703) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.342526406049728,-0.517949938774109,0.299101173877716,-0.209817230701447,0.094706431031227,0.236577421426773,0.283818751573563,0.014917226508260,0.192354768514633,0.443435758352280,-0.219719395041466,0.015945544466376,-0.161367580294609,0.439706802368164,-0.323804944753647,-0.174288734793663) * MODEL5_texOff(vec2(0,0));
res += mat4(0.151512965559959,-0.012611787766218,0.008632223121822,0.006583069451153,0.017718385905027,-0.270621538162231,-0.522810518741608,-0.083127290010452,-0.059200398623943,0.011549801565707,-0.026197491213679,-0.144010305404663,-0.333815693855286,-0.095376349985600,0.304943770170212,0.128990992903709) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.078895874321461,-0.233697205781937,0.018691616132855,0.001571203698404,0.023920580744743,-0.175187364220619,0.102376788854599,-0.108364447951317,0.070814788341522,0.177847653627396,-0.039066415280104,-0.023969402536750,0.109746836125851,-0.040908668190241,0.234929338097572,0.053603146225214) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.013933828100562,0.164782598614693,-0.054567590355873,0.176831558346748,0.065063290297985,-0.043511584401131,-0.173428699374199,0.154945433139801,-0.088633373379707,-0.236434370279312,0.145351558923721,-0.264623522758484,-0.228812128305435,0.135355144739151,0.179174825549126,-0.042332358658314) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.125167042016983,0.139752686023712,0.055917799472809,0.001900926348753,0.034404866397381,-0.030172757804394,-0.163321539759636,0.097074717283249,0.114662460982800,-0.127995997667313,0.075174473226070,0.018427083268762,-0.246800109744072,-0.034626692533493,0.353955090045929,-0.088631086051464) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.211314529180527,0.030904404819012,0.011571748182178,-0.164347559213638,-0.067057639360428,0.066895686089993,0.038574606180191,-0.022144872695208,0.062104247510433,-0.054318092763424,0.106050580739975,-0.024337204173207,-0.075297273695469,-0.193664669990540,0.102315969765186,0.033768869936466) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.175432339310646,-0.212279900908470,-0.243069186806679,0.247026786208153,-0.221962720155716,-0.179575547575951,-0.291358143091202,0.020175687968731,0.102824352681637,0.191210851073265,-0.101157419383526,0.074753291904926,-0.098239816725254,-0.026666179299355,0.078564509749413,0.059388518333435) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.015209275297821,0.197148904204369,-0.095778025686741,0.150759279727936,-0.078703351318836,0.185316920280457,-0.021824467927217,-0.016914961859584,0.341748744249344,0.341200262308121,-0.015087117440999,0.080113857984543,-0.076008588075638,0.210665851831436,0.154261693358421,0.005483788903803) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.126944288611412,0.166396513581276,-0.160505712032318,0.178112939000130,0.233974158763885,-0.131411597132683,0.220449000597000,-0.038127172738314,0.239776507019997,0.020596105605364,0.220342695713043,-0.031010828912258,-0.043630670756102,-0.099850706756115,-0.005584821570665,0.062233556061983) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.225352883338928,-0.117781393229961,0.276460707187653,-0.457004129886627,0.205566436052322,0.267985999584198,-0.122654013335705,0.099218845367432,-0.178547844290733,0.420518666505814,-0.516437649726868,0.050770137459040,0.076698608696461,0.052811525762081,0.068303808569908,0.217700466513634) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.236116752028465,0.165408715605736,-0.106502309441566,-0.084118455648422,0.100623913109303,-0.082647316157818,-0.055837813764811,0.020959548652172,0.210085526108742,0.475332707166672,-0.067309692502022,0.394195884466171,-0.143330737948418,0.254194766283035,0.042488362640142,0.014394033700228) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.060816634446383,0.056041561067104,0.026533696800470,-0.057168558239937,-0.003871704451740,-0.123962379992008,0.025580100715160,-0.115300357341766,0.003498885314912,-0.017422027885914,-0.041935622692108,-0.015722030773759,-0.091982975602150,-0.037796873599291,-0.096647359430790,0.012271361425519) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.046759065240622,0.003990611992776,-0.040301833301783,-0.174614638090134,-0.039946127682924,-0.213312894105911,-0.007692238781601,0.072892986238003,-0.020142404362559,0.048210736364126,0.003384870709851,0.152096346020699,0.045562967658043,-0.017661636695266,-0.052592162042856,0.073024272918701) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.346087425947189,-0.143279001116753,-0.172639429569244,-0.081975221633911,-0.041439574211836,0.004556653089821,-0.012216328643262,-0.043050903826952,0.098602488636971,0.272357881069183,-0.153095617890358,0.089844509959221,0.026571407914162,0.069224916398525,0.098640024662018,0.032203320413828) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.267519712448120,0.346543043851852,0.332279145717621,0.846971809864044) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL2
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 3_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.052454143762589,-0.052135076373816,-0.127203434705734,-0.060557387769222);
res += mat4(-0.017237842082977,-0.039225980639458,0.003664494957775,0.093503065407276,-0.027980476617813,-0.096608594059944,0.103875175118446,0.039683185517788,-0.053362417966127,-0.113221891224384,0.119931057095528,-0.055397696793079,0.061213318258524,-0.034863520413637,-0.069327726960182,0.001495019532740) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.078158721327782,0.259827494621277,-0.037568092346191,0.161860466003418,-0.137655630707741,-0.175723269581795,0.173737838864326,0.057952988892794,-0.172349795699120,0.371637463569641,-0.131568953394890,-0.095415011048317,-0.026778025552630,-0.078185908496380,0.101430259644985,-0.011183666996658) * MODEL4_texOff(vec2(-1,0));
res += mat4(0.000005960336239,-0.030440609902143,-0.215580463409424,0.097145393490791,-0.147493541240692,0.041159052401781,0.047009199857712,0.017862567678094,0.172521278262138,-0.170804709196091,-0.124839574098587,0.013853688724339,0.177229136228561,-0.026153629645705,-0.165485233068466,0.076149813830853) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.084069877862930,-0.008234976790845,0.154949754476547,0.003383032046258,0.008480785414577,-0.058225922286510,-0.114206835627556,0.043740347027779,0.014588980935514,-0.122843183577061,0.191635072231293,-0.097099088132381,0.179601833224297,0.269553750753403,-0.262107461690903,0.062801077961922) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.074321992695332,0.029920676723123,-0.306036114692688,0.181079939007759,-0.326471120119095,0.124880403280258,0.496283441781998,-0.097018271684647,0.048822104930878,0.038775298744440,-0.143337845802307,-0.032556004822254,0.305771142244339,-0.677212476730347,0.133155673742294,0.345731556415558) * MODEL4_texOff(vec2(0,0));
res += mat4(0.246734037995338,-0.089629732072353,-0.071263112127781,0.182477951049805,-0.085518851876259,-0.035241693258286,0.053832694888115,0.034713737666607,0.277744233608246,0.088092587888241,-0.236594900488853,-0.017941921949387,-0.222964823246002,0.209729239344597,0.118478208780289,0.060197133570910) * MODEL4_texOff(vec2(0,1));
res += mat4(0.053144477307796,0.008116453886032,-0.081755466759205,0.013169770129025,-0.118624851107597,0.089074939489365,0.013926209881902,0.003174067940563,0.046131093055010,-0.173823833465576,0.022051813080907,0.007733867503703,0.186041295528412,-0.169045478105545,-0.063292905688286,-0.093617893755436) * MODEL4_texOff(vec2(1,-1));
res += mat4(-0.101542674005032,-0.027011349797249,-0.175742194056511,0.027440182864666,-0.974523246288300,-0.136532828211784,0.250168919563293,-0.058245085179806,0.154431387782097,-0.140049770474434,0.187716290354729,-0.000173251581145,0.068818666040897,0.330874532461166,-0.041574433445930,-0.094205014407635) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.022984314709902,-0.056923620402813,-0.027785969898105,-0.015667947009206,-0.180882602930069,-0.024705007672310,-0.011416723951697,-0.013690494000912,-0.227385818958282,-0.073604203760624,-0.048655390739441,0.006277300417423,0.040124502032995,-0.124883465468884,-0.102917350828648,-0.029866358265281) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.065110996365547,0.061787299811840,0.120837226510048,0.052456241101027,0.180421903729439,0.029881039634347,-0.001229009591043,-0.106691330671310,-0.121084809303284,0.414676636457443,0.050629429519176,-0.070978157222271,-0.051309432834387,-0.038604170084000,0.017275489866734,-0.070037856698036) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.031060935929418,0.459131449460983,-0.044276777654886,0.075849056243896,0.003867971943691,-0.310646742582321,0.040150489658117,0.140210017561913,0.127192750573158,0.119263172149658,-0.046444796025753,-0.057483214884996,-0.039706662297249,0.246368616819382,-0.026026917621493,-0.382474929094315) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.073195241391659,0.000927697808947,-0.226329207420349,0.046870257705450,-0.010073236189783,0.086113706231117,-0.180555179715157,0.032551843672991,0.103072427213192,-0.007347996812314,-0.096736945211887,0.018006494268775,0.096099339425564,-0.012227737344801,-0.078269712626934,-0.148420795798302) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.067730031907558,-0.015649715438485,0.154534667730331,0.011363727971911,0.018283123150468,-0.006404594518244,0.096814945340157,-0.101606883108616,0.011212941259146,0.002383127110079,-0.009742206893861,0.047521155327559,0.078635208308697,-0.221008598804474,-0.027940209954977,0.042796678841114) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.059137050062418,0.191966518759727,0.161955714225769,-0.472072660923004,0.065762080252171,0.424423485994339,0.116286106407642,0.251052498817444,-0.034096717834473,-0.180774539709091,0.087790280580521,-0.073220409452915,0.116256058216095,-0.023619897663593,-0.108459569513798,0.591306328773499) * MODEL5_texOff(vec2(0,0));
res += mat4(0.051794331520796,0.280284166336060,-0.236731976270676,0.037322919815779,0.398337364196777,-0.048572838306427,-0.651045203208923,0.225335150957108,0.099670246243477,0.056642603129148,-0.186806991696358,-0.044301025569439,-0.116596236824989,0.148503199219704,-0.158796578645706,-0.192010730504990) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.026130149140954,-0.004991421010345,0.024993270635605,0.055166121572256,0.042796075344086,-0.333848536014557,0.058362238109112,-0.029199589043856,-0.176640614867210,-0.029555136337876,-0.022327272221446,-0.061350546777248,-0.076583474874496,0.007428633514792,0.039598058909178,0.062283281236887) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.022683216258883,-0.050138074904680,-0.050033546984196,0.313304275274277,0.106051728129387,-0.007227567490190,-0.047307558357716,-0.162724435329437,0.243031278252602,0.028763988986611,-0.038503069430590,0.032264012843370,0.211981132626534,-0.187810704112053,0.231733366847038,-0.029704576358199) * MODEL5_texOff(vec2(1,0));
res += mat4(0.094296872615814,-0.055510915815830,0.135791733860970,0.085578948259354,0.303656786680222,-0.046978436410427,-0.075655914843082,0.162884607911110,0.124831736087799,0.083431079983711,0.050726760178804,-0.001000405754894,-0.023820661008358,0.033157434314489,0.055784184485674,-0.185324251651764) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.139813482761383,0.201869815587997,-0.000863802968524,0.182745367288589,0.012470745481551,-0.112554907798767,0.067129619419575,-0.011336651630700,0.005804743617773,-0.098463542759418,-0.095322832465172,-0.218569964170456,0.013479472137988,0.116936057806015,0.060274206101894,-0.014530966989696) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.022937761619687,0.252568721771240,-0.013157667592168,-0.050318058580160,-0.055717453360558,0.062613777816296,-0.003923340700567,-0.020698895677924,0.241791650652885,-0.321204662322998,0.124257169663906,-0.221026495099068,-0.097256280481815,0.115762859582901,0.043265216052532,0.088875196874142) * MODEL6_texOff(vec2(-1,0));
res += mat4(0.094681121408939,0.146929919719696,0.018257014453411,0.018428321927786,0.063050158321857,0.001371055142954,0.021953942254186,-0.016082227230072,0.119385600090027,-0.251206040382385,0.021800192072988,-0.162083223462105,-0.057982087135315,0.205975517630577,0.057990234345198,0.084398239850998) * MODEL6_texOff(vec2(-1,1));
res += mat4(0.257321268320084,-0.088730022311211,-0.370004653930664,0.555321156978607,-0.073605455458164,-0.053321752697229,0.081354580819607,-0.019973753020167,0.080141112208366,0.158581838011742,0.077171102166176,-0.121030718088150,-0.040171083062887,0.407073706388474,0.056057725101709,-0.038853548467159) * MODEL6_texOff(vec2(0,-1));
res += mat4(-0.311927616596222,-0.109926283359528,0.565145194530487,-0.064014822244644,0.008794241584837,-0.096021078526974,-0.225903525948524,0.081114307045937,0.234129413962364,0.206588670611382,-0.069130860269070,-0.101097166538239,0.037018794566393,0.199758321046829,-0.018035467714071,-0.112958878278732) * MODEL6_texOff(vec2(0,0));
res += mat4(0.053548324853182,-0.013201011344790,-0.061952937394381,0.223897412419319,-0.216729551553726,0.165610447525978,0.149223431944847,-0.194888636469841,0.030344823375344,0.043461609631777,0.153455868363380,-0.058841180056334,0.326089173555374,0.014602800831199,0.010195887647569,0.097747534513474) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.131027892231941,-0.130420833826065,-0.063886538147926,-0.055499229580164,-0.006340148858726,0.063780359923840,-0.023543938994408,0.049772754311562,0.189915701746941,-0.045598912984133,-0.113131046295166,-0.026209330186248,-0.000491301238071,0.058458209037781,-0.055529441684484,0.014414291828871) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.194722548127174,-0.345258355140686,-0.013992208056152,-0.014407305046916,-0.038857307285070,-0.156621485948563,0.055323567241430,0.051332440227270,0.035514868795872,-0.128939256072044,-0.052328638732433,-0.011197632178664,-0.071925140917301,0.523544549942017,-0.027809286490083,-0.005676865577698) * MODEL6_texOff(vec2(1,0));
res += mat4(0.126904219388962,-0.148489430546761,0.043981458991766,0.065468668937683,-0.018251905217767,0.193608418107033,0.141994521021843,-0.073602169752121,0.125745028257370,0.010403006337583,0.015747591853142,-0.007944116368890,0.132302984595299,0.143520399928093,0.042862933129072,0.080009661614895) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.036677289754152,0.289887547492981,-0.118454292416573,0.960520923137665) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.088699698448181,0.044541697949171,-0.030982257798314,0.070772893726826);
res += mat4(-0.075222954154015,-0.035012442618608,0.150693267583847,-0.033928938210011,-0.013281458988786,-0.036565478891134,-0.154022678732872,-0.074555858969688,0.151410460472107,-0.387589305639267,-0.184868931770325,0.020127499476075,0.083663135766983,-0.074840985238552,-0.161760792136192,0.018493281677365) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.163778439164162,0.171264261007309,-0.032568894326687,0.114009767770767,0.106773614883423,-0.170974969863892,-0.548285245895386,-0.184399768710136,0.125003293156624,-0.390418529510498,-0.146054387092590,-0.042208131402731,0.123117066919804,0.235041663050652,-0.042830929160118,-0.199348524212837) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.238478913903236,-0.113452248275280,0.160765796899796,-0.129256412386894,0.141639426350594,0.165900632739067,-0.147828832268715,0.010910520330071,-0.013210339471698,-0.305781602859497,-0.073929406702518,0.010409479029477,-0.082931876182556,-0.104068219661713,0.082552745938301,-0.097278393805027) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.433504939079285,0.062887825071812,0.027341218665242,-0.100459344685078,0.328046619892120,0.332464903593063,0.221174225211143,0.026014186441898,0.186484947800636,-0.337125837802887,0.005975292995572,0.014358749613166,0.163834229111671,0.084838986396790,0.386733531951904,-0.046617243438959) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.217926755547523,0.041982695460320,-0.799323260784149,0.580228924751282,0.042013134807348,-0.249498188495636,0.031524080783129,0.157331779599190,0.222233176231384,-0.586313664913177,-0.074102021753788,0.083409972488880,0.305122107267380,0.125947698950768,-0.320507675409317,0.852265894412994) * MODEL4_texOff(vec2(0,0));
res += mat4(0.317699044942856,-0.002185206161812,-0.168182313442230,0.020241811871529,-0.134870439767838,0.285060256719589,-0.202543586492538,-0.106165319681168,-0.022278206422925,-0.598436236381531,-0.198697432875633,0.004525068681687,-0.265267789363861,-0.117561250925064,-0.171090736985207,-0.023998292163014) * MODEL4_texOff(vec2(0,1));
res += mat4(0.012360678985715,-0.081400834023952,0.247948825359344,-0.011315166950226,-0.006397222634405,0.339901536703110,-0.098750419914722,-0.007472543977201,0.180580019950867,-0.477432578802109,-0.096015647053719,-0.004068325273693,-0.035572271794081,-0.048917230218649,0.043649949133396,-0.038434736430645) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.302302151918411,0.001931421691552,0.136735603213310,0.005519611760974,-0.012568606063724,-0.256179273128510,0.219818070530891,-0.133512273430824,0.320732146501541,-0.691297352313995,-0.113951072096825,0.024753408506513,-0.167773962020874,-0.151446595788002,0.351407140493393,-0.208288729190826) * MODEL4_texOff(vec2(1,0));
res += mat4(0.219644069671631,0.055881254374981,-0.162105202674866,-0.057457197457552,-0.052965547889471,0.219814360141754,0.089808717370033,0.124760515987873,-0.177249550819397,-0.545238554477692,-0.099271729588509,-0.017868729308248,-0.046338457614183,0.274134367704391,-0.017865765839815,-0.108767062425613) * MODEL4_texOff(vec2(1,1));
res += mat4(0.252747267484665,-0.031028177589178,-0.001912212115712,0.041406467556953,0.168784976005554,0.089066945016384,-0.101191878318787,0.155562594532967,-0.234721571207047,0.021094957366586,0.198983401060104,-0.037751682102680,-0.159484580159187,-0.305059403181076,-0.092320792376995,-0.045963138341904) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.014764916151762,0.139049470424652,0.127380341291428,0.044685419648886,-0.020797370001674,-0.154312282800674,0.460158973932266,0.225279748439789,0.145227432250977,0.042560309171677,0.194751337170601,0.071664102375507,-0.137405082583427,-0.079373568296432,-0.189608842134476,-0.101038143038750) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.307804405689240,-0.033239345997572,0.056730691343546,0.036524150520563,-0.007675923407078,0.005246676038951,0.008516031317413,-0.003055393230170,-0.171891093254089,-0.218694537878036,0.085327528417110,0.048513617366552,-0.229352146387100,0.171885952353477,-0.081780731678009,0.004088535904884) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.134340316057205,-0.016820982098579,0.123141169548035,-0.146840453147888,0.216250419616699,-0.184106022119522,-0.057828027755022,0.269033372402191,-0.041913196444511,0.013456571847200,0.038772810250521,0.119904756546021,-0.127560093998909,0.186855897307396,0.374390244483948,0.030678691342473) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.274725794792175,-0.007946251891553,0.049735382199287,0.120146632194519,-0.142960667610168,0.205907151103020,-0.291303843259811,0.111661970615387,0.084031164646149,0.259349107742310,-0.136880487203598,0.031780447810888,-0.127954766154289,0.255949914455414,-0.093680635094643,0.139796003699303) * MODEL5_texOff(vec2(0,0));
res += mat4(0.004338316153735,0.019263084977865,0.045902218669653,-0.093170695006847,0.533985972404480,0.180983573198318,0.257072895765305,0.229856804013252,0.042236581444740,-0.098894394934177,0.068388305604458,0.180532842874527,-0.058652035892010,-0.132286295294762,-0.623627781867981,-0.276131093502045) * MODEL5_texOff(vec2(0,1));
res += mat4(0.035490758717060,0.000673076894600,0.007992758415639,0.014788840897381,-0.087333984673023,0.069924868643284,0.134007915854454,0.073021702468395,-0.068774558603764,0.049462504684925,0.070556193590164,-0.028291163966060,0.221651226282120,0.060934033244848,-0.042969726026058,-0.031750679016113) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.616186916828156,-0.009524377062917,-0.465464472770691,-0.065704591572285,0.301873266696930,0.113787747919559,-0.157279089093208,0.049929730594158,-0.673837780952454,0.007846615277231,0.381509989500046,0.091762572526932,0.207759857177734,-0.096299789845943,0.080660104751587,0.133287906646729) * MODEL5_texOff(vec2(1,0));
res += mat4(0.071484774351120,0.132084220647812,-0.050707276910543,-0.062000464648008,0.277113318443298,-0.094608545303345,0.141165837645531,-0.041182968765497,-0.159001797437668,0.043337855488062,0.284953594207764,-0.087231576442719,-0.342940509319305,0.033915985375643,0.181980207562447,-0.043295521289110) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.161319971084595,0.039866413921118,-0.218041792511940,0.136931240558624,0.005821774248034,-0.019260285422206,0.137168094515800,0.037657398730516,-0.081137605011463,0.004513289313763,0.054682053625584,-0.008407797664404,0.091901905834675,0.148701161146164,0.062634050846100,-0.018368726596236) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.205745071172714,-0.165170207619667,0.284026563167572,-0.095860384404659,0.055740870535374,0.053942479193211,0.302995890378952,0.052375394850969,0.131783753633499,0.212016627192497,0.028067316859961,-0.084000371396542,-0.049142684787512,0.197171419858932,0.124133236706257,0.060171600431204) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.164071470499039,0.111284039914608,-0.163969919085503,0.101577773690224,0.101180501282215,0.093268088996410,-0.011194913648069,0.058157913386822,-0.021663326770067,0.057522896677256,0.235591605305672,-0.044839069247246,-0.056745428591967,0.157774150371552,-0.004869072698057,0.116208769381046) * MODEL6_texOff(vec2(-1,1));
res += mat4(0.099058762192726,-0.075799092650414,-0.021826317533851,0.141379490494728,-0.161131143569946,-0.033829566091299,-0.325797051191330,0.023020619526505,0.015591611154377,0.047025054693222,0.069675385951996,-0.008117041550577,0.090528436005116,0.221558943390846,0.063912883400917,-0.007211118005216) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.022680895403028,0.028464613482356,-0.273777484893799,-0.105187259614468,0.212758481502533,-0.011888632550836,-0.330659747123718,-0.039871178567410,0.073296122252941,0.019707199186087,-0.281400233507156,-0.130273118615150,-0.157280504703522,0.140792205929756,0.178679242730141,-0.124233298003674) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.168684124946594,-0.152497708797455,-0.224558934569359,0.196584030985832,0.219724342226982,0.017569785937667,0.094507098197937,0.061021406203508,-0.103663250803947,0.115047208964825,0.355978041887283,-0.270135819911957,0.117921188473701,0.315340876579285,0.189489454030991,0.130033090710640) * MODEL6_texOff(vec2(0,1));
res += mat4(0.050601538270712,-0.109880648553371,-0.107926771044731,0.032717354595661,0.003903801785782,0.055061176419258,0.050706531852484,0.106739744544029,0.261859595775604,0.110208660364151,0.011633326299489,-0.012605373747647,0.056017525494099,0.163090705871582,0.014880051836371,0.028924839571118) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.003430101089180,0.253066390752792,-0.126144662499428,0.062382798641920,-0.357238173484802,-0.083659850060940,-0.000471008301247,-0.062730893492699,0.068506054580212,0.048647634685040,0.155853673815727,-0.139238759875298,-0.178360432386398,0.072512775659561,0.119917385280132,-0.026692500337958) * MODEL6_texOff(vec2(1,0));
res += mat4(0.040776293724775,-0.095240697264671,-0.079571522772312,0.064260400831699,0.162886068224907,0.017006397247314,0.025893770158291,0.124771252274513,-0.007573401089758,0.137922972440720,0.072909355163574,0.008290208876133,-0.146648347377777,0.133656263351440,0.128676563501358,-0.010258661583066) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.494397848844528,-0.159179270267487,0.244722992181778,0.939643740653992) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL3
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 3_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.018142547458410,0.041870303452015,0.043939337134361,-0.205246582627296);
res += mat4(0.102770991623402,0.073565915226936,0.150351092219353,-0.002708505373448,0.070721872150898,-0.103477388620377,0.199029862880707,0.016487382352352,0.038064289838076,0.251448571681976,0.138868510723114,0.045701071619987,-0.089832484722137,-0.186214551329613,-0.152632519602776,0.096032083034515) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.104632250964642,0.052477616816759,0.067149423062801,-0.082427538931370,0.041530076414347,0.132436960935593,-0.137456804513931,0.215394124388695,0.275445580482483,-0.278222620487213,0.207776069641113,-0.096709646284580,0.069833785295486,-0.202126905322075,0.130781218409538,-0.023356823250651) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.009024507366121,0.114343546330929,0.160854458808899,-0.030985604971647,0.030688593164086,-0.018921991810203,0.071970909833908,0.012445176020265,0.021691475063562,0.232200056314468,0.140671446919441,-0.001226338790730,0.005438800901175,0.109980128705502,-0.197871893644333,0.022766891866922) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.136545911431313,-0.027462428435683,0.260840952396393,-0.062270719558001,0.098248682916164,-0.259467124938965,-0.143413662910461,-0.010560993105173,0.123837433755398,0.249554708600044,0.184280946850777,-0.119798503816128,-0.100736483931541,0.036483503878117,-0.307733893394470,0.203419059514999) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.131605908274651,0.171417132019997,0.024071533232927,0.376590311527252,-0.222660511732101,-0.061340797692537,-0.431336432695389,0.210687831044197,-0.271037578582764,0.044270955026150,0.078377284109592,0.355178087949753,-0.138518765568733,-0.048312537372112,0.020632764324546,0.245169669389725) * MODEL4_texOff(vec2(0,0));
res += mat4(0.191651389002800,0.296634405851364,0.458249360322952,-0.311984628438950,0.044520907104015,0.008368554525077,0.112415380775928,-0.112694397568703,0.172360792756081,0.159094169735909,0.238812133669853,-0.090867042541504,-0.074259132146835,-0.048753712326288,-0.312396347522736,-0.302149146795273) * MODEL4_texOff(vec2(0,1));
res += mat4(0.080556489527225,0.073335319757462,0.146955415606499,-0.067476816475391,-0.130194306373596,-0.046783611178398,-0.023910544812679,-0.104222990572453,0.008094873279333,0.131107151508331,0.135042652487755,0.122127279639244,-0.117684490978718,0.148636654019356,-0.115931063890457,0.080710388720036) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.001673868857324,-0.007304490543902,-0.125691741704941,0.027199598029256,-0.102841071784496,-0.009505655616522,-0.055140350013971,-0.007780461572111,0.296821922063828,0.137389495968819,0.137666285037994,0.104825720191002,-0.033517912030220,-0.113136716187000,0.028508936986327,-0.017352994531393) * MODEL4_texOff(vec2(1,0));
res += mat4(0.358078092336655,0.214609041810036,0.086004555225372,-0.077164672315121,0.084186516702175,-0.005677830893546,0.010929447598755,0.078359022736549,0.246298819780350,0.048722639679909,0.152029037475586,-0.037534210830927,-0.203430622816086,-0.040533404797316,-0.150686636567116,0.032166332006454) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.030815808102489,-0.103246077895164,-0.048341818153858,0.025161568075418,0.024150680750608,-0.159276112914085,0.037339199334383,0.163305878639221,0.234712287783623,0.036576788872480,0.267220199108124,-0.391046583652496,-0.027636172249913,0.047967664897442,0.041010018438101,0.043025977909565) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.183485701680183,-0.133856356143951,-0.118451155722141,0.103566557168961,-0.064237393438816,0.129021897912025,-0.171620994806290,0.044186998158693,0.264305204153061,0.061671976000071,0.146010294556618,0.185367718338966,0.156586408615112,-0.270258873701096,-0.034946996718645,-0.098020911216736) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.060253102332354,0.165612190961838,0.053547482937574,0.004304338712245,-0.092539601027966,-0.046148456633091,-0.026300763711333,-0.026413125917315,0.113890558481216,0.025885660201311,0.029326951131225,-0.058799341320992,0.109693497419357,-0.034933671355247,0.120199769735336,-0.019707763567567) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.172868981957436,0.078074611723423,-0.106720700860023,0.109463863074780,0.057465564459562,-0.116015277802944,0.043304968625307,0.424398750066757,-0.158956468105316,-0.249535769224167,-0.341442376375198,-0.028111878782511,-0.094318255782127,0.289156943559647,-0.253379046916962,0.292870610952377) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.160899773240089,0.138781756162643,0.841495752334595,-0.223833248019218,0.333935111761093,0.098308205604553,0.265951722860336,-0.285228431224823,-0.128649607300758,-0.095185123383999,-0.107268743216991,-0.099559620022774,-0.032792184501886,0.503174662590027,0.234621658921242,0.324875593185425) * MODEL5_texOff(vec2(0,0));
res += mat4(0.043442811816931,-0.018005119636655,0.175899401307106,-0.055812176316977,0.129230931401253,0.149233713746071,-0.075633063912392,-0.071996547281742,0.041280195116997,-0.021572321653366,-0.075994640588760,-0.095598787069321,0.180154860019684,-0.066744968295097,-0.186933591961861,-0.634612560272217) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.086427748203278,-0.137737944722176,-0.080342531204224,0.086284704506397,-0.141026154160500,0.320232510566711,0.089400537312031,-0.123228713870049,-0.182975456118584,0.062375325709581,-0.060481429100037,0.014887072145939,-0.116190612316132,-0.161732897162437,-0.113838165998459,0.197065919637680) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.072171628475189,-0.214260861277580,-0.331521809101105,-0.036248795688152,-0.121702849864960,-0.238253250718117,0.063374482095242,-0.081905975937843,-0.031705204397440,0.026354441419244,0.038738954812288,-0.059060070663691,0.003176986705512,-0.049801554530859,0.022227164357901,0.115855157375336) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.139557942748070,-0.058126822113991,-0.194775655865669,0.015514950267971,0.490126281976700,0.057080324739218,-0.271322369575500,0.234845250844955,0.003290898865089,0.006090746261179,-0.074943855404854,-0.067600414156914,-0.175161540508270,-0.054176636040211,0.179952204227448,-0.378678292036057) * MODEL5_texOff(vec2(1,1));
res += mat4(0.059937946498394,-0.067363478243351,0.092914164066315,-0.076144874095917,-0.037140287458897,0.030174696817994,0.038421224802732,-0.002199466340244,-0.249404236674309,-0.239932373166084,-0.301947027444839,0.031492169946432,-0.013534712605178,-0.049380883574486,-0.164054885506630,-0.079052343964577) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.010195771232247,0.119177989661694,0.062454033643007,-0.034073896706104,0.128669172525406,-0.099947832524776,0.062277007848024,-0.028072722256184,-0.178484022617340,0.066412486135960,0.029653260484338,-0.002893958240747,-0.400514602661133,0.049972385168076,-0.541844725608826,0.267080694437027) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.184634298086166,-0.002470488194376,-0.028282195329666,0.112626500427723,0.108124703168869,0.067640759050846,0.053963251411915,-0.132092401385307,-0.132197216153145,-0.100798420608044,-0.036265958100557,-0.065240480005741,-0.152499467134476,-0.154364004731178,-0.202389121055603,-0.296606153249741) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.193964555859566,-0.259144097566605,0.018579132854939,0.336305558681488,0.111707687377930,0.105648763477802,0.125043898820877,-0.145322039723396,-0.029326139017940,0.184855788946152,0.151105955243111,-0.057394836097956,-0.054041985422373,-0.102213479578495,-0.090558759868145,0.032421912997961) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.280550390481949,-0.231816917657852,-0.096383132040501,-0.548922479152679,-0.095464810729027,-0.127013847231865,-0.138093337416649,0.256284475326538,0.103289611637592,-0.071034930646420,0.184866562485695,-0.103565692901611,-0.136469185352325,-0.127316400408745,-0.299515902996063,0.040317751467228) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.105159759521484,0.191408962011337,0.167719855904579,0.285903483629227,0.010883293114603,-0.108321823179722,0.054185237735510,-0.776519179344177,0.059679381549358,-0.171381473541260,-0.047347255051136,0.047643318772316,-0.511217117309570,-0.070536509156227,0.136764973402023,0.057162899523973) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.016935860738158,0.180872529745102,-0.179530978202820,0.028577111661434,0.019695322960615,-0.113415405154228,-0.156297355890274,0.000323565676808,-0.041414380073547,0.010438829660416,0.103974133729935,0.121189855039120,-0.115306638181210,-0.022280525416136,0.032747447490692,0.039085518568754) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.006675726734102,-0.126013621687889,-0.000710119958967,0.204755753278732,-0.070730440318584,0.221117123961449,0.020976210013032,0.069278970360756,0.088935278356075,0.052098292857409,0.038908537477255,0.032510176301003,-0.074236385524273,-0.237683117389679,-0.138256549835205,-0.069004945456982) * MODEL6_texOff(vec2(1,0));
res += mat4(0.199394851922989,0.013245066627860,-0.103951811790466,0.030838092789054,0.277007371187210,-0.035732779651880,-0.010676344856620,-0.074046418070793,0.023879349231720,-0.066786117851734,-0.013065502047539,-0.041863821446896,-0.082009799778461,-0.036028917878866,0.112912908196449,0.113123051822186) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.247356832027435,-0.710358798503876,0.635376155376434,0.086508452892303) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.097739681601524,0.105017729103565,0.061546474695206,-0.078558355569839);
res += mat4(0.129523083567619,-0.027713188901544,0.050999961793423,-0.065194807946682,0.021770300343633,-0.001189053407870,-0.034048806875944,-0.079019613564014,0.100113913416862,0.024643521755934,-0.010681482031941,-0.031311810016632,-0.056407630443573,0.140842184424400,0.098220050334930,-0.048043478280306) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.154684185981750,0.262858629226685,0.283497184514999,0.068461425602436,0.092286519706249,-0.021610440686345,0.180887863039970,-0.224935173988342,0.160227596759796,0.030259434133768,0.036907561123371,0.055796060711145,0.021023631095886,-0.331761240959167,0.227399155497551,0.061709500849247) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.098642192780972,-0.215600758790970,0.135170623660088,-0.077860310673714,0.180383622646332,0.050530385226011,-0.011382017284632,0.131016314029694,0.219218313694000,-0.009178282693028,0.056394450366497,0.108491159975529,0.181076437234879,0.096428707242012,0.096549607813358,-0.044929381459951) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.002429135376588,-0.090811572968960,-0.027118690311909,0.070147454738617,0.084774449467659,-0.022422624751925,0.000587811984587,-0.013501556590199,0.126513302326202,0.044973906129599,0.107510350644588,0.077640555799007,0.016983466222882,0.143898785114288,-0.019231555983424,0.093719594180584) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.207771405577660,0.498629152774811,-0.083013072609901,-0.251609653234482,-0.003145060269162,0.013286372646689,-0.430906951427460,0.015991883352399,0.014051514677703,-0.025861259549856,0.078879937529564,0.273400545120239,-0.233431965112686,-0.178942680358887,-0.124671056866646,0.249539941549301) * MODEL4_texOff(vec2(0,0));
res += mat4(0.042546734213829,-0.140394136309624,0.267039239406586,-0.074751317501068,0.004231667611748,0.010829228907824,-0.151611194014549,-0.017691014334559,0.174827739596367,0.017795825377107,-0.055669013410807,0.112009301781654,0.211361557245255,0.014409864321351,0.141343340277672,-0.013739900663495) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.078549094498158,-0.044836360961199,0.032290980219841,0.149496868252754,0.017878971993923,0.004279550630599,0.076109848916531,0.113823480904102,0.113489612936974,-0.010292552411556,-0.017715610563755,0.249242350459099,0.067176565527916,0.023451628163457,0.050542332231998,0.030969109386206) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.163811758160591,0.068878985941410,-0.262769639492035,-0.161424547433853,-0.147926032543182,-0.023861702531576,0.119688190519810,0.554102003574371,0.110905326902866,-0.039249222725630,-0.000340181926731,0.361334890127182,0.144385233521461,-0.034493576735258,0.138628244400024,-0.248463630676270) * MODEL4_texOff(vec2(1,0));
res += mat4(0.150213599205017,-0.008170375600457,-0.157819196581841,0.073869295418262,0.096316270530224,-0.062005992978811,0.140708267688751,-0.210345193743706,0.230015680193901,0.000365390762454,0.069652527570724,0.200560927391052,-0.243185698986053,-0.052170440554619,0.085317760705948,-0.190113127231598) * MODEL4_texOff(vec2(1,1));
res += mat4(0.049890670925379,0.011911899782717,-0.159950539469719,-0.104883573949337,0.085561156272888,-0.035158608108759,0.080272488296032,0.095281384885311,0.079868577420712,0.013592080213130,-0.025010090321302,-0.003521398408338,-0.309794753789902,0.072163417935371,-0.044260613620281,0.157574519515038) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.002336052479222,-0.014917885884643,-0.134968861937523,0.149017632007599,-0.154638662934303,0.358815371990204,-0.261808574199677,0.510530352592468,-0.080085404217243,-0.046363160014153,-0.089568205177784,0.094469919800758,0.041472263634205,-0.089343219995499,-0.003042043186724,-0.140599846839905) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.148375719785690,-0.028398899361491,-0.655104875564575,-0.022305667400360,-0.228329360485077,-0.114793486893177,0.157174691557884,-0.002765923971310,0.056055646389723,0.134301856160164,-0.180649086833000,0.080240234732628,0.236189410090446,0.067978858947754,0.031907271593809,-0.020782519131899) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.070912607014179,-0.098367102444172,-0.226261734962463,0.024953261017799,0.121531531214714,0.099184580147266,-0.038084752857685,-0.128689482808113,0.048136673867702,0.117612965404987,0.087497189640999,0.035538777709007,0.041203830391169,0.367210924625397,0.235790848731995,-0.183960914611816) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.204890653491020,0.020705979317427,0.174054518342018,-0.371038526296616,0.141887351870537,0.186707586050034,0.045634243637323,-0.527662277221680,-0.125437811017036,0.080057315528393,-0.213844269514084,0.345278948545456,-0.037167824804783,-0.237720265984535,0.067820318043232,0.255830913782120) * MODEL5_texOff(vec2(0,0));
res += mat4(-0.198160111904144,0.007355774287134,-0.058724913746119,-0.166535690426826,-0.024415876716375,-0.118210017681122,-0.050585027784109,-0.139558523893356,0.165979772806168,0.011270334012806,-0.040638662874699,0.219341397285461,0.034353323280811,-0.096524119377136,-0.020871086046100,0.095714278519154) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.165051147341728,0.034931875765324,-0.047039106488228,-0.093127861618996,-0.043973110616207,0.138186007738113,0.118838265538216,-0.075280070304871,0.093211047351360,-0.085851244628429,0.025083027780056,0.125437870621681,0.186364650726318,-0.026802368462086,-0.122917816042900,0.042846281081438) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.031011663377285,-0.079605825245380,-0.210811197757721,-0.067344494163990,-0.157981172204018,-0.049277834594250,-0.025478847324848,-0.102810315787792,-0.014973394572735,0.129878073930740,0.210483863949776,-0.073598496615887,-0.012794286012650,-0.066238015890121,-0.246887385845184,-0.085128255188465) * MODEL5_texOff(vec2(1,0));
res += mat4(0.057432074099779,-0.023780601099133,-0.146094575524330,0.065843120217323,0.017588201910257,-0.010781526565552,0.012446832843125,0.291714936494827,0.089641861617565,0.017046967521310,0.051886625587940,-0.303237706422806,0.092658750712872,0.096896782517433,-0.105659015476704,-0.043601684272289) * MODEL5_texOff(vec2(1,1));
res += mat4(0.017935488373041,-0.170569434762001,0.117286749184132,-0.164354458451271,0.139639586210251,-0.058631185442209,-0.065324485301971,0.013678669929504,0.034480240195990,0.197811976075172,0.017573015764356,-0.054757643491030,-0.358077615499496,-0.044762119650841,0.032768804579973,-0.177331641316414) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.110178291797638,0.280308008193970,-0.010933127254248,0.286007851362228,-0.092217706143856,0.083622783422470,-0.262022465467453,0.147600397467613,0.188150078058243,-0.409640818834305,-0.046790324151516,-0.118671558797359,-0.582979202270508,0.059131409972906,-0.178988352417946,0.023111173883080) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.103497639298439,-0.161336511373520,0.250157922506332,-0.049914378672838,-0.184129476547241,-0.003844843013212,-0.050008781254292,0.000306769652525,-0.081983909010887,0.074226066470146,0.110549405217171,-0.085011713206768,-0.349954813718796,-0.069980219006538,-0.117730662226677,-0.101121507585049) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.135347619652748,-0.280103772878647,-0.041101876646280,0.267693072557449,0.061267651617527,0.186875104904175,-0.053888916969299,-0.167114093899727,-0.038806911557913,0.104770191013813,0.074517175555229,-0.011457047425210,-0.482286453247070,-0.001767169218510,0.079803630709648,-0.088736295700073) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.125459328293800,0.387177228927612,0.249899104237556,-0.304168105125427,0.059827085584402,-0.041389372199774,0.164409115910530,0.126864850521088,-0.161171466112137,-0.243209496140480,0.144825056195259,-0.238189652562141,-0.655411183834076,-0.011896524578333,0.113150775432587,-0.209084227681160) * MODEL6_texOff(vec2(0,0));
res += mat4(0.173629671335220,-0.077410064637661,0.430220723152161,-0.013992784544826,-0.060436859726906,-0.049228087067604,-0.070421807467937,0.048191897571087,-0.118140205740929,-0.018144933506846,0.019373025745153,0.278368294239044,-0.658631026744843,-0.070885710418224,-0.147212237119675,-0.200355276465416) * MODEL6_texOff(vec2(0,1));
res += mat4(0.000182608840987,-0.042347706854343,0.014152935706079,-0.073314450681210,0.218654572963715,-0.064555883407593,0.047969356179237,0.012497841380537,-0.013664395548403,-0.013760998845100,0.022573916241527,0.088338732719421,-0.478035569190979,0.016645617783070,0.075050942599773,-0.039352308958769) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.129273489117622,0.047196261584759,0.120666556060314,-0.085409812629223,0.000290004623821,0.080538146197796,-0.086453035473824,-0.345654129981995,0.109631918370724,-0.093421727418900,-0.071314528584480,-0.002100016223267,-0.364124357700348,-0.091407038271427,0.096112385392189,0.037832096219063) * MODEL6_texOff(vec2(1,0));
res += mat4(0.002792316023260,0.026241566985846,0.085343748331070,-0.094596117734909,0.058486137539148,-0.002270547440276,0.011223528534174,0.159128993749619,0.018425220623612,-0.028487967327237,0.037911657243967,-0.120871931314468,-0.257084846496582,0.001099075423554,0.008367310278118,-0.200005114078522) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.203394278883934,-0.879072308540344,-0.191747412085533,0.075340852141380) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL4
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 4_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.048537202179432,-0.061561435461044,0.077853411436081,-0.106798127293587);
res += mat4(-0.021432170644403,-0.018951309844851,-0.012664544396102,-0.036166001111269,-0.058168716728687,0.045485749840736,0.117481701076031,0.009336745366454,-0.019429853186011,-0.082268014550209,-0.017916454002261,0.142763540148735,0.032785963267088,-0.088683024048805,0.146986082196236,-0.103456899523735) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.048420563340187,-0.052480708807707,0.054217156022787,-0.124087490141392,-0.117661073803902,-0.071281991899014,0.062182165682316,0.008577580563724,-0.126965090632439,-0.129145339131355,0.172303080558777,0.033315680921078,0.060768604278564,-0.240604266524315,0.031639993190765,-0.237535029649734) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.001022351556458,-0.025416325777769,0.027053091675043,-0.025443673133850,-0.011388234794140,0.006010350771248,0.066233716905117,-0.048971138894558,-0.019260350614786,0.083054468035698,-0.193706855177879,0.057167600840330,0.011053725145757,-0.026801962405443,-0.029014350846410,0.012271568179131) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.026508523151278,0.078789852559566,-0.120807766914368,-0.009871792048216,0.030431475490332,-0.185355439782143,0.329018473625183,0.022165738046169,-0.075792290270329,-0.078680686652660,-0.036923348903656,-0.112613871693611,0.019191240891814,0.058589179068804,0.054610669612885,0.172130584716797) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.047564852982759,-0.147775456309319,0.308695971965790,0.099859468638897,-0.014903704635799,0.259850561618805,-0.415374010801315,0.024302769452333,0.067786604166031,-0.085928820073605,0.025307208299637,0.009563647210598,-0.504882395267487,0.100489072501659,-0.017194768413901,0.479874283075333) * MODEL1_texOff(vec2(0,0));
res += mat4(0.164301484823227,-0.157583579421043,-0.005119704641402,-0.100434094667435,-0.018229622393847,-0.122626625001431,0.328331321477890,-0.289781242609024,0.077365338802338,-0.094626687467098,-0.010891950689256,-0.034382991492748,-0.130685806274414,-0.047475043684244,0.066241778433323,-0.011039111763239) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.006927751004696,-0.108780115842819,-0.106077127158642,0.035331103950739,0.031875044107437,0.063406802713871,0.008468249812722,-0.073294788599014,0.011027620173991,0.146739929914474,-0.061419170349836,0.063677884638309,-0.082486368715763,0.113678269088268,0.088687822222710,-0.068809829652309) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.044849276542664,0.034050054848194,0.150080218911171,-0.064834505319595,0.072794273495674,-0.088624387979507,-0.001849320367910,0.001279864343815,-0.163428992033005,-0.006041328422725,-0.019023103639483,-0.125495851039886,0.236848235130310,0.165747150778770,0.033086095005274,0.205666825175285) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.061435658484697,-0.127330675721169,-0.026752471923828,-0.063466601073742,0.109514705836773,0.135087296366692,0.071281783282757,0.120151087641716,0.011066905222833,0.112477526068687,-0.052859194576740,-0.040176033973694,-0.021873258054256,-0.098913840949535,0.032659269869328,0.073730058968067) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.064064368605614,0.072834625840187,0.145943418145180,0.092029280960560,-0.036915533244610,-0.126660332083702,0.019594015553594,-0.090099133551121,0.099750295281410,-0.107429131865501,-0.122281670570374,0.032444067299366,0.004177750088274,-0.024685991927981,-0.011381039395928,0.075099050998688) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.044247876852751,-0.151549205183983,0.130296215415001,-0.210183650255203,0.104509241878986,-0.170109510421753,0.130595907568932,-0.181092783808708,0.049264341592789,0.096586853265762,-0.007231514900923,0.097797684371471,0.185214698314667,0.060861967504025,0.109777092933655,0.111601419746876) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.032150156795979,0.011589168570936,-0.114389628171921,0.065346419811249,0.172234579920769,0.072544567286968,-0.042361505329609,0.110946483910084,-0.012545877136290,-0.049597613513470,0.026480007916689,-0.067786037921906,0.040864903479815,0.003036612877622,-0.082551658153534,-0.161684483289719) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.150044441223145,-0.005601176060736,0.214825004339218,-0.058037705719471,0.154276445508003,-0.044702600687742,0.098582476377487,0.080759972333908,-0.130116209387779,0.100878737866879,-0.126667931675911,-0.130778342485428,0.049690458923578,0.138560205698013,0.052331242710352,-0.220904842019081) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.176544368267059,-0.005990373902023,-0.042811732739210,0.392371833324432,-0.067949123680592,0.356823891401291,-0.005364223383367,0.179223731160164,-0.055157884955406,-0.105402722954750,0.089633680880070,0.154996469616890,-0.162148356437683,-0.200960680842400,0.237659186124802,-0.464413315057755) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.065335571765900,-0.071552701294422,-0.082731723785400,0.091089725494385,0.021937943994999,-0.175153598189354,0.049388993531466,-0.076373286545277,0.123609878122807,0.102626554667950,-0.236779674887657,-0.089668378233910,0.201314672827721,0.112497098743916,-0.276191383600235,-0.128944814205170) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.132410034537315,-0.133468896150589,0.072463750839233,-0.089068517088890,0.102019026875496,0.009211918339133,0.029771124944091,-0.085190355777740,0.180363535881042,0.082363709807396,-0.223250955343246,0.070701062679291,0.079066351056099,0.000001540909579,0.049903746694326,-0.058556623756886) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.004431562032551,-0.088865898549557,0.075627572834492,-0.029535861685872,0.068405732512474,-0.237608641386032,0.117678627371788,0.023558853194118,0.113496854901314,0.010403082706034,0.030102001503110,-0.194676622748375,0.058182030916214,0.393233031034470,0.141100510954857,0.097055636346340) * MODEL2_texOff(vec2(1,0));
res += mat4(0.033992655575275,-0.099215343594551,-0.053198304027319,0.053772922605276,0.051919188350439,0.078316584229469,-0.059527851641178,-0.207508876919746,-0.020079715177417,-0.144464477896690,-0.090738728642464,0.102766223251820,-0.060223877429962,-0.044626358896494,-0.088783085346222,0.167726248502731) * MODEL2_texOff(vec2(1,1));
res += mat4(0.181431710720062,-0.031512878835201,0.151533037424088,0.056717716157436,0.025313571095467,-0.025967165827751,0.060736395418644,-0.057195570319891,-0.182901114225388,0.071043714880943,0.048715688288212,0.009605466388166,0.033539310097694,0.061446577310562,-0.085188210010529,-0.067607142031193) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.005176159553230,-0.030195698142052,-0.142953455448151,-0.158841073513031,0.023953573778272,-0.000729772786144,-0.090782165527344,0.020172931253910,-0.257412731647491,-0.083867341279984,0.039185121655464,0.121512889862061,-0.121929824352264,0.112307913601398,-0.252321541309357,0.125313624739647) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.152701243758202,-0.104534395039082,0.134522110223770,0.029940538108349,0.065321207046509,0.064592398703098,-0.019707759842277,0.081314183771610,-0.036665942519903,0.012602378614247,-0.075448617339134,0.038833338767290,-0.133279159665108,0.067411921918392,-0.027127314358950,0.185361579060555) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.177572026848793,-0.198044046759605,-0.109258942306042,-0.253740072250366,-0.007815843448043,-0.101191692054272,0.126277729868889,0.004599187057465,-0.088920690119267,0.073100291192532,0.027887720614672,0.057717803865671,0.081925123929977,-0.058460228145123,-0.204151242971420,0.303849875926971) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.193081393837929,-0.096352882683277,-0.045444969087839,-0.089907214045525,0.109136529266834,0.019813926890492,-0.287697017192841,-0.125215977430344,0.105597637593746,0.362091034650803,0.285565525293350,-0.001645695534535,-0.046573981642723,0.290276676416397,-0.152773246169090,-0.402313411235809) * MODEL3_texOff(vec2(0,0));
res += mat4(0.066322274506092,0.032028570771217,0.090360447764397,-0.065774992108345,0.026007771492004,-0.076395824551582,0.147549331188202,-0.109185077250004,-0.057010080665350,0.183529302477837,-0.074288897216320,-0.107589907944202,-0.000687153718900,0.045098640024662,0.132370799779892,-0.098357491195202) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.036167740821838,0.138308659195900,-0.160765752196312,-0.050080668181181,-0.014386623166502,0.102168843150139,0.049546811729670,-0.089842274785042,-0.019907759502530,-0.097268380224705,0.107874713838100,0.045308377593756,-0.112612649798393,-0.192640781402588,-0.003866842715070,-0.015160190872848) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.155191630125046,-0.110697805881500,0.104489557445049,-0.113339841365814,0.105631798505783,-0.161669164896011,-0.135085389018059,0.025027178227901,-0.025689207017422,0.011133308522403,0.158455118536949,0.212992832064629,0.060210857540369,-0.059518598020077,-0.185767382383347,0.113610312342644) * MODEL3_texOff(vec2(1,0));
res += mat4(0.037848360836506,0.178514376282692,-0.051730081439018,-0.100482583045959,-0.009924210608006,0.079257160425186,0.063628271222115,-0.002603651024401,-0.031177798286080,-0.010121271014214,-0.024174593389034,0.108405143022537,-0.013099571689963,0.180233553051949,0.009614914655685,-0.020895935595036) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.998160004615784,0.503320276737213,-0.782370209693909,0.049965515732765) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.029568893834949,-0.013127292506397,-0.187501728534698,-0.124721974134445);
res += mat4(-0.088964059948921,0.109053306281567,0.076030947268009,-0.021577458828688,-0.129947751760483,-0.039945792406797,-0.027984760701656,-0.079609476029873,-0.100500084459782,-0.064144819974899,0.105048842728138,-0.103952027857304,0.008019647561014,-0.029415154829621,0.100638493895531,-0.120769053697586) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.171492606401443,-0.041952021420002,-0.059099886566401,-0.161640182137489,-0.049836520105600,0.079601019620895,0.049230683594942,0.114940382540226,0.065317459404469,-0.149293690919876,0.086285687983036,0.114348009228706,-0.008967068977654,-0.261149555444717,0.155094653367996,-0.010970123112202) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.166842266917229,-0.002202377421781,-0.066359318792820,0.135455772280693,0.107946552336216,0.112238876521587,-0.106009416282177,0.064269870519638,0.070552803575993,-0.002867215778679,-0.109895311295986,-0.091202206909657,-0.000525214651134,-0.009087882004678,-0.092044271528721,-0.036679599434137) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.140475749969482,-0.011740447953343,0.093746840953827,-0.110399872064590,0.117189697921276,0.058363441377878,0.128159016370773,0.165003210306168,-0.299859642982483,-0.122769035398960,-0.111979983747005,0.160735696554184,-0.004997243639082,-0.177236557006836,0.161221772432327,-0.100650437176228) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.166867479681969,-0.008973893709481,-0.004305879119784,-0.065297178924084,0.052920740097761,0.053785085678101,-0.316729068756104,-0.560313880443573,0.048303283751011,0.062071528285742,0.071606397628784,-0.087752446532249,-0.233194574713707,-0.132950663566589,0.129903003573418,-0.075483210384846) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.087537422776222,0.012166628614068,-0.047770809382200,0.065791957080364,0.099572055041790,-0.098450660705566,0.124021209776402,-0.263971745967865,-0.042803272604942,0.060458123683929,0.072190485894680,0.251000344753265,0.016876801848412,-0.018612075597048,0.032923534512520,0.040332306176424) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.072734132409096,-0.015711972489953,-0.288069397211075,0.105848409235477,-0.003504245541990,-0.160495147109032,-0.237168729305267,-0.093427978456020,0.035819366574287,-0.036697447299957,0.405515611171722,0.077487736940384,0.076981514692307,0.079115144908428,-0.034229166805744,-0.069197148084641) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.094129674136639,0.043937202543020,0.035332903265953,0.280813515186310,0.039289437234402,-0.342267990112305,-0.005513950251043,0.191336661577225,0.174594312906265,-0.009787595830858,0.088807202875614,-0.050889201462269,-0.064660929143429,0.308572620153427,-0.326971888542175,0.082960225641727) * MODEL1_texOff(vec2(1,0));
res += mat4(0.039243262261152,0.036585059016943,-0.017161868512630,-0.118668392300606,-0.041135717183352,-0.091178774833679,-0.125828444957733,0.151043698191643,0.077594831585884,0.030030999332666,0.113494843244553,-0.059384610503912,0.110230460762978,-0.012206607498229,0.160881534218788,-0.004558296874166) * MODEL1_texOff(vec2(1,1));
res += mat4(0.033150020986795,0.029183607548475,-0.057200137525797,-0.024218808859587,-0.028856977820396,0.004624873865396,0.158195123076439,-0.040939159691334,-0.012629324570298,0.067840389907360,-0.043689142912626,-0.095313526690006,0.020059775561094,-0.073845051229000,0.037713799625635,0.089739762246609) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.046105176210403,-0.200394466519356,0.120053499937057,-0.149886637926102,0.230692297220230,0.265095502138138,-0.078601494431496,-0.071417093276978,0.095500871539116,0.335217982530594,-0.185464948415756,0.107311785221100,0.263954699039459,0.075361706316471,0.039835426956415,0.086377426981926) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.147698074579239,-0.073075391352177,0.127793043851852,0.036852743476629,0.192821905016899,0.005069294944406,-0.005636810325086,-0.209133028984070,-0.096165589988232,-0.023216396570206,0.088826201856136,-0.064107038080692,-0.137337371706963,0.052810594439507,-0.018715213984251,-0.135976165533066) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.036481447517872,-0.057252183556557,0.125381007790565,-0.013321467675269,0.125258639454842,-0.047024048864841,0.088556982576847,-0.101497456431389,-0.119177140295506,-0.157626971602440,0.110209673643112,-0.021637126803398,0.227898806333542,0.021709417924285,-0.149057805538177,-0.241335973143578) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.062127612531185,-0.101909667253494,-0.320367813110352,-0.196253553032875,0.140763685107231,-0.168738201260567,0.141196027398109,-0.011889847926795,-0.175149813294411,-0.354815632104874,0.698472499847412,0.316538721323013,0.225480005145073,-0.121464006602764,0.347505897283554,-0.453170895576477) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.056594755500555,0.012219902127981,-0.167242094874382,0.121053308248520,0.050248652696609,-0.099213175475597,0.140915334224701,-0.168397694826126,-0.121402218937874,-0.078777797520161,0.029080720618367,0.287208914756775,-0.170633792877197,-0.032051477581263,0.022352512925863,0.130645632743835) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.158769369125366,-0.347258508205414,-0.154299616813660,0.091310724616051,0.176364585757256,-0.151767238974571,0.014367953874171,-0.042321536689997,0.017674531787634,0.019424432888627,0.174342632293701,-0.044897906482220,-0.053757313638926,0.033573821187019,-0.130564585328102,0.067918919026852) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.095812968909740,-0.041780456900597,0.246526122093201,0.212177872657776,0.198223635554314,0.009219284169376,-0.121318832039833,-0.064930096268654,0.138411402702332,0.389400303363800,0.232720553874969,-0.319980442523956,-0.203338295221329,0.054119724780321,-0.295741528272629,0.202535942196846) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.019796280190349,-0.152543678879738,0.094794414937496,0.010421018116176,0.144254118204117,-0.155370056629181,-0.024939799681306,-0.172805353999138,0.093070343136787,0.299580782651901,0.039474636316299,-0.150625169277191,0.051332108676434,0.125089585781097,0.167497381567955,-0.016429144889116) * MODEL2_texOff(vec2(1,1));
res += mat4(0.121028177440166,0.307629942893982,-0.002259385073557,0.002676052041352,-0.007650399114937,-0.010600210167468,0.008821968920529,0.013311242684722,-0.145814552903175,-0.117347732186317,-0.052612300962210,-0.092580273747444,-0.182047486305237,-0.034579146653414,-0.101842068135738,0.062534675002098) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.030601175501943,0.058610267937183,-0.272994965314865,-0.086966440081596,-0.056387405842543,-0.112876139581203,-0.022928625345230,0.025141434744000,-0.124225206673145,-0.297953069210052,0.166914269328117,0.273220062255859,-0.113111726939678,0.045119464397430,0.042307205498219,0.261807054281235) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.046659417450428,-0.140954583883286,-0.105178453028202,0.205562725663185,-0.010896581225097,0.088771753013134,-0.080466069281101,-0.012703177519143,-0.031085196882486,-0.060368474572897,0.022928163409233,0.026875361800194,-0.003863100660965,0.220143720507622,-0.015252998098731,0.213068261742592) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.007077232468873,-0.141410022974014,0.092033378779888,-0.101471871137619,-0.085985369980335,-0.052086308598518,0.003387534758076,-0.044834326952696,0.045658968389034,-0.037019260227680,0.248113065958023,-0.053907524794340,-0.127578914165497,0.305001944303513,0.010234028100967,0.218638285994530) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.013110775500536,0.054046925157309,0.174015969038010,0.126742973923683,-0.092137232422829,0.079345867037773,-0.040852379053831,-0.063816592097282,0.040258619934320,0.008322623558342,-0.307291388511658,-0.107798293232918,-0.024833636358380,-0.022828401997685,0.118046090006828,0.227340266108513) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.001490590395406,0.150061190128326,-0.207583069801331,-0.191336557269096,0.067640334367752,-0.101649209856987,0.205253064632416,0.011454284191132,-0.063690148293972,-0.043535940349102,0.025415116921067,-0.077474415302277,0.071716718375683,-0.053503222763538,0.122096404433250,0.198004618287086) * MODEL3_texOff(vec2(0,1));
res += mat4(0.061581995338202,0.048071637749672,-0.232088699936867,0.150058090686798,-0.073225438594818,0.016887748613954,-0.101343885064125,-0.005217676050961,-0.085268221795559,-0.327478915452957,-0.017152747139335,0.027646934613585,-0.027461733669043,0.268512517213821,0.076785594224930,0.106246925890446) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.018853090703487,-0.300392597913742,-0.198189303278923,-0.280987679958344,-0.160139232873917,-0.031486127525568,0.208054319024086,0.045576781034470,0.120691202580929,-0.208678141236305,0.010959786362946,0.008537315763533,0.092975005507469,0.325443387031555,-0.008090103045106,-0.107811406254768) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.201969727873802,-0.175485417246819,-0.097777754068375,0.208327844738960,0.164787605404854,0.062795035541058,-0.229435756802559,-0.124833047389984,-0.036073360592127,-0.005052544642240,0.005498099140823,-0.012369547970593,-0.084467768669128,0.136575460433960,-0.163211479783058,0.025953264907002) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.810108304023743,0.208351343870163,0.207063525915146,-0.000504640862346) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL5
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 4_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.128195285797119,-0.165680646896362,-0.005676330998540,-0.132747814059258);
res += mat4(-0.048265919089317,0.027022365480661,0.044971466064453,-0.084784813225269,0.002482697367668,-0.109060265123844,-0.073098003864288,0.116601593792439,0.112017907202244,0.195219591259956,-0.019517388194799,0.145544543862343,-0.096871443092823,-0.111548423767090,-0.060980472713709,-0.094459049403667) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.017660144716501,-0.075056254863739,-0.010074133053422,0.110014662146568,-0.152046829462051,-0.130925431847572,0.056079745292664,0.190284207463264,-0.154716268181801,0.213565707206726,-0.173052966594696,-0.100723370909691,0.082200869917870,-0.242624804377556,0.012424129061401,0.183072522282600) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.171820044517517,-0.098072133958340,0.013411281630397,-0.050936855375767,-0.115241624414921,0.038791421800852,0.063243500888348,0.069712482392788,0.132179245352745,0.039793279021978,0.043786037713289,-0.011715025641024,0.012998838908970,-0.100107684731483,-0.093317925930023,0.113173112273216) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.134340614080429,-0.073380969464779,0.119903422892094,0.037817243486643,-0.171413466334343,0.074654877185822,-0.154028207063675,-0.075271286070347,-0.164344906806946,0.058486007153988,0.047425575554371,0.159633070230484,0.221576511859894,0.124418966472149,-0.010436857119203,-0.027444444596767) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.387291848659515,-0.165981903672218,-0.068166702985764,-0.215979591012001,0.136227563023567,0.389286637306213,0.307810574769974,-0.070006698369980,0.193322718143463,-0.249802768230438,0.029062369838357,0.424435973167419,-0.398488044738770,0.585186898708344,0.207216754555702,-0.180124312639236) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.054763343185186,0.056478910148144,0.025245353579521,-0.156004995107651,-0.151293575763702,0.111325241625309,-0.178867891430855,-0.239661991596222,-0.026793524622917,0.109824813902378,-0.040176033973694,0.007967652752995,-0.028213629499078,0.133710369467735,-0.006037845276296,-0.054319813847542) * MODEL1_texOff(vec2(0,1));
res += mat4(0.083026945590973,0.026294536888599,0.000345185399055,-0.026112640276551,-0.235926002264023,0.123513557016850,0.050080031156540,-0.051456473767757,0.066588252782822,-0.104578003287315,0.027288807556033,-0.196247041225433,-0.018015928566456,-0.072674073278904,-0.054041601717472,0.159784600138664) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.068274416029453,0.117715857923031,-0.040227640420198,0.029153922572732,-0.079484827816486,0.050704158842564,-0.004570097196847,0.099869050085545,-0.051840759813786,0.290456920862198,0.048060804605484,-0.088808797299862,0.051616657525301,-0.198424249887466,-0.042249269783497,0.345142692327499) * MODEL1_texOff(vec2(1,0));
res += mat4(0.089412815868855,-0.195880174636841,0.048864994198084,0.000060481179389,-0.051424264907837,0.053839836269617,-0.056574419140816,0.015402100980282,0.101452246308327,0.083502836525440,-0.000538231222890,0.023467123508453,-0.010393556207418,-0.232784196734428,0.079519487917423,-0.027279416099191) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.180815711617470,0.382886886596680,-0.034622576087713,-0.260413169860840,-0.260602325201035,-0.067947670817375,0.065699771046638,-0.015149307437241,0.227863237261772,-0.145803242921829,-0.040780343115330,0.116738915443420,0.080249227583408,-0.099868156015873,-0.034930177032948,0.083588100969791) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.062337577342987,-0.133096948266029,-0.017809102311730,0.233963504433632,-0.031218254938722,-0.237083405256271,-0.006677378434688,0.170068964362144,0.040505927056074,0.181999310851097,-0.079359740018845,0.003735634265468,-0.130936518311501,0.063180662691593,-0.196332067251205,-0.154983416199684) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.099678412079811,-0.098269149661064,0.097854934632778,0.137057036161423,-0.021300606429577,0.041139584034681,0.010529856197536,-0.045549366623163,-0.007334305904806,-0.015259235166013,-0.003933383151889,-0.022839890792966,0.121652372181416,-0.044939022511244,0.049669139087200,-0.078222908079624) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.064030990004539,-0.351708501577377,-0.091791138052940,0.217248901724815,-0.238935247063637,0.120800279080868,-0.047134965658188,-0.132671311497688,0.173446685075760,0.034162465482950,-0.014564041979611,-0.138659790158272,0.117547340691090,-0.153350204229355,-0.061569210141897,-0.229739204049110) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.151506915688515,0.303949087858200,0.032157186418772,-0.188427269458771,0.111772134900093,0.478769153356552,0.066129475831985,-0.606236815452576,-0.281398296356201,-0.335172116756439,-0.187215730547905,0.083633624017239,-0.397397130727768,-0.389495581388474,0.652102828025818,-0.213021069765091) * MODEL2_texOff(vec2(0,0));
res += mat4(0.113062486052513,0.220301672816277,0.107702299952507,-0.004414941649884,-0.016844017431140,0.064522169530392,-0.066397100687027,-0.148570775985718,0.298092901706696,0.023319141939282,0.147007018327713,0.033931288868189,0.286181718111038,0.161738231778145,0.050311531871557,-0.052037909626961) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.066786140203476,0.180230632424355,0.019779711961746,-0.059739165008068,-0.114951252937317,-0.050138354301453,-0.010891767218709,-0.044963385909796,0.216924980282784,-0.096928596496582,-0.019414482638240,-0.014732712879777,-0.058789871633053,0.001484311767854,-0.157284900546074,-0.033096332103014) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.028003482148051,-0.110411413013935,-0.008736074902117,0.210212618112564,0.118326425552368,-0.215722829103470,-0.058738447725773,-0.036174003034830,-0.049943793565035,0.127817869186401,-0.135846287012100,-0.054088257253170,-0.090619623661041,0.236403584480286,-0.198885098099709,0.037450730800629) * MODEL2_texOff(vec2(1,0));
res += mat4(0.069283470511436,-0.024646252393723,0.027247445657849,0.005598972085863,-0.052720114588737,-0.140775725245476,0.031979430466890,-0.122321024537086,0.037460364401340,-0.026293061673641,0.049004431813955,-0.067791424691677,0.058131780475378,-0.041896887123585,0.090001232922077,-0.021083686500788) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.051060870289803,0.088147610425949,-0.108020678162575,-0.246260941028595,-0.017949083819985,-0.019421774893999,-0.057012788951397,-0.000479359296151,0.053622625768185,-0.079619035124779,0.049194984138012,0.168399110436440,0.196104794740677,-0.026366556063294,-0.071289420127869,0.005108545999974) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.064102061092854,0.009138566441834,0.093684099614620,-0.233446955680847,-0.028168242424726,-0.028414072468877,0.026034317910671,-0.148927524685860,-0.056732349097729,-0.132873669266701,0.093697443604469,0.521128833293915,0.156654089689255,0.060876179486513,0.055552624166012,-0.057528696954250) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.018585579469800,-0.042229712009430,-0.072869196534157,-0.062078736722469,0.048134285956621,0.014743020758033,-0.039832860231400,-0.162925973534584,0.059174243360758,0.094406686723232,0.105743855237961,0.173963606357574,0.028813373297453,0.136342361569405,0.027757301926613,0.064006336033344) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.110367856919765,-0.004921188578010,0.029140340164304,0.125670194625854,-0.045586824417114,0.079315237700939,-0.101210907101631,-0.044135022908449,-0.098405621945858,-0.160597860813141,0.040463570505381,-0.018636224791408,0.492754757404327,0.303350478410721,-0.109382472932339,-0.013537920080125) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.099980868399143,-0.210627406835556,-0.051750976592302,0.064739838242531,0.112381555140018,0.092147447168827,0.073463611304760,-0.001305908779614,-0.253822028636932,-0.026436680927873,-0.028600525110960,-0.532661616802216,0.498923748731613,-0.057185262441635,0.307046949863434,0.166798010468483) * MODEL3_texOff(vec2(0,0));
res += mat4(0.011816020123661,0.020087676122785,-0.079629540443420,-0.071826241910458,-0.049982648342848,-0.273491978645325,-0.092391297221184,0.055178944021463,0.162108570337296,0.070266284048557,0.117936320602894,-0.006274051964283,-0.227601036429405,-0.260713249444962,-0.087378360331059,-0.101295873522758) * MODEL3_texOff(vec2(0,1));
res += mat4(0.221340581774712,-0.161008074879646,0.078866586089134,-0.205810636281967,-0.050521422177553,-0.166631415486336,0.004435541573912,0.086254522204399,-0.113526120781898,0.147592484951019,-0.035343453288078,-0.039747953414917,0.273908823728561,-0.233317881822586,-0.056850608438253,0.077011309564114) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.153012931346893,0.266050279140472,0.017300751060247,-0.100935839116573,0.155193313956261,-0.239927396178246,-0.000638288038317,0.203372314572334,-0.062458410859108,0.009184513241053,-0.054559044539928,0.070882208645344,-0.154389500617981,0.043422397226095,0.056948494166136,-0.121847987174988) * MODEL3_texOff(vec2(1,0));
res += mat4(0.089516013860703,0.018468024209142,0.012406032532454,-0.050632648169994,-0.177858263254166,-0.093496069312096,-0.039811827242374,0.045445397496223,-0.018990572541952,-0.222689107060432,0.059601012617350,-0.047276135534048,-0.032608773559332,0.105344183743000,0.076139189302921,0.108899086713791) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.306487798690796,0.210876658558846,1.037277817726135,-0.030517769977450) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.028351735323668,-0.070245034992695,-0.032832127064466,-0.129625231027603);
res += mat4(-0.006283196154982,0.120608516037464,0.059156693518162,-0.020436758175492,-0.016856791451573,-0.053156252950430,-0.126497626304626,-0.101570978760719,0.074809052050114,-0.069554790854454,0.051965657621622,-0.161274269223213,-0.048747517168522,-0.088472723960876,0.031560815870762,-0.035404603928328) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.006132170557976,0.333501309156418,0.071959368884563,0.330306738615036,0.100833751261234,-0.131148800253868,0.046923462301493,-0.032792221754789,0.025891356170177,-0.138374432921410,0.128091454505920,0.113859735429287,-0.006455185357481,-0.041247118264437,-0.165479943156242,0.049904175102711) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.001946688164026,0.121341742575169,0.007602375000715,0.080977268517017,0.051171615719795,0.042131759226322,-0.000753547938075,0.056398935616016,-0.054694619029760,-0.008758157491684,0.001956021180376,0.010175003670156,0.054892081767321,-0.155570656061172,0.073166593909264,-0.018338393419981) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.155899494886398,0.147660106420517,0.145454972982407,0.065665461122990,0.118734888732433,-0.341731786727905,0.071771107614040,0.167684376239777,0.136234015226364,0.174254804849625,-0.127866894006729,0.275949358940125,0.166020214557648,0.049264356493950,-0.224905595183372,0.032232329249382) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.187576875090599,0.351654261350632,0.047675918787718,-0.455376774072647,0.386761665344238,-0.069929033517838,-0.112302720546722,0.049378503113985,-0.172657102346420,0.000877913378645,0.032084133476019,0.083508595824242,-0.340699493885040,0.319584220647812,0.461313694715500,0.117327272891998) * MODEL1_texOff(vec2(0,0));
res += mat4(0.310226112604141,0.131594747304916,-0.018069479614496,0.246192872524261,-0.286534577608109,-0.212409362196922,-0.113717101514339,-0.214332565665245,0.147896379232407,0.067778959870338,0.034243874251842,0.042666081339121,-0.089393235743046,0.075367242097855,-0.113015241920948,0.241698339581490) * MODEL1_texOff(vec2(0,1));
res += mat4(0.033066719770432,-0.098990894854069,-0.061495222151279,0.010497322306037,-0.002826133277267,0.027468519285321,0.093642659485340,-0.031198853626847,-0.102290451526642,-0.042793102562428,0.095060244202614,-0.108733437955379,-0.024825956672430,-0.090388022363186,0.036868885159492,-0.076957389712334) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.169613778591156,-0.208280727267265,-0.200221478939056,0.040836308151484,0.016927294433117,-0.244803622364998,-0.077362246811390,-0.023652533069253,-0.115617580711842,0.232601955533028,0.059053979814053,-0.166539907455444,-0.106821224093437,-0.192389503121376,-0.312702596187592,-0.013318438082933) * MODEL1_texOff(vec2(1,0));
res += mat4(0.087246343493462,-0.095056392252445,0.066746316850185,-0.108074270188808,-0.011669442988932,0.042074300348759,0.083465337753296,0.097061626613140,-0.050688125193119,0.179514229297638,-0.038734734058380,-0.028820585459471,-0.000480808143038,-0.151841163635254,-0.051836125552654,-0.083012379705906) * MODEL1_texOff(vec2(1,1));
res += mat4(0.046697400510311,-0.020963739603758,0.064183332026005,-0.141980990767479,-0.105106011033058,-0.005541486199945,0.094592630863190,-0.106266580522060,0.074086353182793,0.057458210736513,-0.071527950465679,-0.105530574917793,-0.010563494637609,0.076640717685223,0.020292110741138,0.046862479299307) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.060930494219065,-0.324709743261337,-0.050825096666813,0.227038711309433,-0.090297333896160,0.177412182092667,-0.087804496288300,-0.049095734953880,-0.088160552084446,0.119274929165840,0.050997704267502,-0.147256568074226,-0.133236557245255,0.368394494056702,-0.243745222687721,-0.031803317368031) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.023791639134288,-0.125576198101044,-0.065537922084332,-0.049751777201891,-0.005597659386694,0.065224885940552,0.110802821815014,-0.273752301931381,-0.166317567229271,0.080790832638741,-0.062135197222233,-0.053367141634226,0.045873593539000,0.180293545126915,0.069398142397404,-0.136450707912445) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.006269261706620,-0.010177779011428,0.013139920309186,0.082701705396175,-0.071825191378593,-0.234784767031670,0.023297825828195,-0.013210226781666,0.045339178293943,-0.077814638614655,-0.036122649908066,0.070984743535519,-0.035231385380030,-0.028621701523662,-0.140134364366531,-0.021500084549189) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.155387371778488,0.336633980274200,-0.121746942400932,-0.309290349483490,-0.034483585506678,-0.541038751602173,0.181318655610085,0.003614745801315,-0.133763134479523,0.168079137802124,-0.061202384531498,0.079661868512630,-0.356520235538483,-0.114835523068905,0.432268291711807,-0.112215004861355) * MODEL2_texOff(vec2(0,0));
res += mat4(0.232183933258057,0.260043203830719,-0.022064335644245,0.175513386726379,-0.285529792308807,-0.265685409307480,0.062874637544155,-0.107955627143383,0.350021213293076,-0.016608865931630,0.089204013347626,-0.145316392183304,0.489680111408234,-0.070567257702351,-0.036920320242643,0.150438234210014) * MODEL2_texOff(vec2(0,1));
res += mat4(0.000088885775767,0.030975477769971,0.006354947108775,0.044646300375462,0.001866724225692,0.000085836065409,0.046827480196953,-0.040701858699322,0.039662949740887,0.000337331352057,-0.069837830960751,-0.017001481726766,0.000463752105134,-0.111511200666428,0.014686980284750,0.068549267947674) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.155832871794701,-0.345653325319290,-0.200397536158562,0.079417437314987,-0.105927303433418,0.235204637050629,0.143577888607979,-0.147237658500671,0.238290935754776,0.076597586274147,0.219392955303192,-0.103308655321598,0.036072138696909,-0.137994438409805,-0.244978889822960,0.130471587181091) * MODEL2_texOff(vec2(1,0));
res += mat4(0.083571441471577,-0.050777997821569,0.053200196474791,-0.110651969909668,-0.008876024745405,0.097497686743736,-0.019298223778605,-0.208220258355141,0.038922950625420,0.111722499132156,0.051979590207338,0.022230712696910,0.038551647216082,-0.119549624621868,-0.010464188642800,0.073324382305145) * MODEL2_texOff(vec2(1,1));
res += mat4(0.012950729578733,0.214441090822220,-0.015585790388286,-0.038400407880545,-0.004504254087806,-0.031595740467310,0.023711010813713,0.033774722367525,0.050502024590969,-0.257093816995621,-0.086336068809032,-0.095790550112724,0.042587812989950,-0.033789895474911,-0.070804893970490,0.071122899651527) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.100468620657921,-0.088324636220932,0.141170799732208,-0.023336082696915,0.027558885514736,-0.033710703253746,-0.070883423089981,0.055635754019022,0.078134201467037,-0.446453303098679,0.067746140062809,0.018758190795779,-0.023789368569851,-0.028558678925037,-0.019117474555969,0.340274631977081) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.107038274407387,-0.288850069046021,0.076274245977402,0.021933181211352,0.038967430591583,0.058879919350147,0.011305845342577,-0.052926041185856,-0.027368348091841,-0.124938637018204,-0.009183983318508,-0.079585403203964,0.120124533772469,0.119685798883438,-0.013429671525955,0.252044886350632) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.010658126324415,-0.293697297573090,-0.027106285095215,0.043498061597347,0.087677769362926,0.039513800293207,-0.094803519546986,-0.036116559058428,0.037379223853350,-0.139625996351242,-0.018178684636950,-0.045330058783293,-0.008417292498052,0.009813676588237,-0.020933873951435,0.088965341448784) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.217526450753212,-0.119560874998569,0.063333131372929,-0.011489734053612,-0.065269574522972,0.097839102149010,0.064807280898094,-0.180455505847931,0.004447294399142,0.208016529679298,0.086190812289715,0.296362429857254,0.044070787727833,-0.109324030578136,-0.119065977632999,0.482261240482330) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.168329134583473,0.164711356163025,-0.063338123261929,-0.001114579616114,-0.212147012352943,-0.246364116668701,0.071815803647041,0.101961076259613,-0.122514344751835,-0.007511625066400,-0.041841056197882,0.033458158373833,-0.187176302075386,0.003558332799003,0.013010077178478,-0.123041689395905) * MODEL3_texOff(vec2(0,1));
res += mat4(0.000195998174604,0.248467847704887,0.089059673249722,-0.024973563849926,0.063686817884445,-0.050926674157381,-0.001983699621633,-0.005081088282168,-0.015111077576876,-0.077675171196461,-0.045258600264788,0.023785131052136,0.021140653640032,0.010698015801609,-0.071375422179699,0.022682918235660) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.070647343993187,0.094949528574944,0.087378688156605,-0.067035607993603,-0.056880239397287,-0.141031920909882,-0.112173810601234,0.066930167376995,-0.025240398943424,0.013032502494752,0.015199175104499,-0.216930463910103,0.125964596867561,0.349532216787338,0.077192530035973,-0.005037594120950) * MODEL3_texOff(vec2(1,0));
res += mat4(0.152099534869194,-0.273548871278763,-0.154757484793663,0.178724840283394,-0.077222980558872,0.031050786375999,0.082057461142540,-0.174233391880989,0.071946151554585,-0.070388562977314,-0.040552254766226,-0.025135822594166,0.004994012881070,0.069535225629807,-0.080492727458477,0.141498953104019) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.894678771495819,0.105614833533764,1.030059695243835,0.072801314294338) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL6
//!DESC [AiUpscale_Fast_2x_Photo_RT] mapping 4_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.152174338698387,-0.054547522217035,-0.147193953394890,-0.182564020156860);
res += mat4(-0.003202240681276,0.070873141288757,-0.127693027257919,-0.101500563323498,-0.000891705742106,-0.105426579713821,0.079896718263626,0.023927368223667,-0.086519338190556,-0.062865339219570,-0.160080373287201,0.300330430269241,-0.025745783001184,-0.041555538773537,-0.040567778050900,-0.097898274660110) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.137165054678917,0.006956966128200,-0.061780553311110,-0.128528386354446,-0.108739532530308,0.089161083102226,0.105602994561195,0.204722613096237,0.047315020114183,-0.175508841872215,0.030801769345999,-0.173008382320404,-0.003201220883057,0.219041675329208,-0.104177370667458,0.053096555173397) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.231134876608849,0.071164496243000,-0.041036400943995,0.025286106392741,-0.356211572885513,0.049264509230852,-0.326094746589661,-0.082192383706570,-0.004067098256201,0.103792726993561,-0.245384797453880,0.083987377583981,0.117947526276112,0.085704125463963,-0.012248464860022,0.118053041398525) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.177692890167236,0.089772529900074,-0.069694668054581,0.100150115787983,0.169214442372322,-0.222713455557823,0.061227489262819,0.079665511846542,0.070123381912708,0.068623237311840,-0.031841166317463,-0.288161426782608,-0.145742878317833,0.056064937263727,-0.172089040279388,-0.131277769804001) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.393229067325592,-0.145442381501198,0.424126416444778,0.076917588710785,-0.345869779586792,0.288656622171402,-0.324215322732925,0.241449385881424,-0.194195076823235,0.036883257329464,-0.094900295138359,-0.200945168733597,0.306393027305603,-0.405168145895004,0.032814159989357,0.224274143576622) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.048195444047451,0.218790531158447,-0.344835758209229,0.052335694432259,-0.298455297946930,-0.358552277088165,-0.090833015739918,0.287777721881866,0.228917092084885,-0.126164361834526,-0.008993115276098,0.014809220097959,-0.125514805316925,0.104624956846237,-0.034792210906744,-0.291146159172058) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.066705130040646,0.008365095593035,0.025719653815031,-0.098479129374027,-0.041282374411821,0.006664598360658,-0.045351121574640,0.120060190558434,0.036739181727171,-0.089283280074596,0.082852743566036,0.070969223976135,-0.045060694217682,0.134152457118034,-0.086667589843273,-0.132932156324387) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.085267543792725,-0.036147795617580,-0.230765014886856,-0.035033762454987,-0.241149678826332,-0.044483903795481,0.046167537570000,-0.047152742743492,0.058339171111584,-0.054247792810202,-0.129366040229797,0.139016941189766,0.108190238475800,0.247372210025787,0.000834520848002,-0.260229140520096) * MODEL1_texOff(vec2(1,0));
res += mat4(0.016047080978751,0.059364348649979,-0.160908013582230,-0.219332516193390,-0.110715493559837,-0.030572256073356,0.067811600863934,0.034196618944407,0.073769479990005,0.006628823932260,0.019653731957078,0.009007612243295,0.061702422797680,0.039443831890821,-0.155713185667992,-0.168423488736153) * MODEL1_texOff(vec2(1,1));
res += mat4(0.074502192437649,-0.122247777879238,-0.031055608764291,0.200693249702454,-0.040853191167116,-0.018027942627668,0.013727927580476,-0.095871463418007,-0.017444355413318,-0.026594953611493,0.141468331217766,-0.074696972966194,0.090306401252747,0.048848763108253,0.101509787142277,-0.127654105424881) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.091295585036278,0.166298836469650,0.216885492205620,-0.028408210724592,-0.175894036889076,-0.127330511808395,0.041396055370569,0.024842327460647,0.146874487400055,-0.074017949402332,-0.093368493020535,0.044603303074837,0.122139893472195,0.029756611213088,-0.102674372494221,-0.255458533763885) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.284842789173126,0.202669024467468,-0.066389471292496,0.067210383713245,-0.017469979822636,0.055591467767954,-0.076232329010963,0.191552817821503,-0.077932663261890,0.041536379605532,0.108646698296070,-0.033190321177244,-0.033723134547472,0.141522005200386,0.126297652721405,0.025842614471912) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.086457073688507,-0.005537876859307,0.083258107304573,-0.313283354043961,-0.034853968769312,-0.085625141859055,-0.043002378195524,-0.036263540387154,0.377429634332657,-0.259832143783569,0.142776057124138,-0.128377526998520,0.068998396396637,0.012151324190199,-0.001563768484630,0.008610825054348) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.239211291074753,0.199079111218452,0.185931131243706,0.193091526627541,-0.411611914634705,0.023345081135631,-0.451172858476639,0.157028526067734,0.586801111698151,-0.093485310673714,0.364915132522583,-0.351402610540390,0.148905351758003,-0.246864795684814,0.199562788009644,0.259330660104752) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.537687957286835,0.244411930441856,-0.160527169704437,0.127360865473747,0.222725570201874,-0.029683109372854,0.317653000354767,-0.046683184802532,-0.089965365827084,0.335067987442017,-0.147587925195694,0.077044375240803,-0.113177902996540,0.273388475179672,-0.245623558759689,0.218413934111595) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.021266138181090,0.053844053298235,0.000760953000281,0.205123066902161,-0.028967890888453,0.020181382074952,-0.047237459570169,-0.004234123509377,0.028954641893506,-0.075066126883030,0.098533168435097,0.049726501107216,0.046538859605789,-0.062917001545429,0.040911167860031,-0.027403380721807) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.033898033201694,0.053721986711025,0.037113215774298,0.039924629032612,-0.081402577459812,-0.012984911911190,-0.037870313972235,-0.177843198180199,0.058053944259882,-0.106714755296707,-0.004751041065902,0.006501883268356,-0.016568114981055,-0.090900875627995,-0.016434019431472,-0.044271916151047) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.106441184878349,0.028853937983513,0.034855052828789,0.003639204893261,0.067200191318989,0.022902937605977,0.191071540117264,-0.060378566384315,0.049472037702799,0.066658519208431,0.027795841917396,-0.095855697989464,-0.011133607476950,0.069267474114895,-0.084976866841316,-0.020103055983782) * MODEL2_texOff(vec2(1,1));
res += mat4(0.123422466218472,-0.146757453680038,-0.087468177080154,0.246618330478668,0.037090402096510,-0.048925805836916,0.093224383890629,0.070706039667130,-0.026666980236769,0.047635767608881,-0.149417817592621,-0.254449516534805,0.104207657277584,-0.018236028030515,0.267539054155350,0.167484298348427) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.203173562884331,0.136983335018158,-0.126731038093567,-0.062527008354664,-0.229775905609131,0.061245080083609,0.233178690075874,0.201399400830269,0.166621372103691,0.011533750221133,0.142930895090103,-0.066571526229382,0.211811199784279,0.005772875156254,-0.056593757122755,-0.503826200962067) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.168762698769569,-0.222674623131752,-0.166426301002502,0.103160597383976,-0.011379722505808,-0.047575864940882,0.000817423220724,-0.151996970176697,-0.156024962663651,0.094476297497749,-0.147716611623764,-0.052246972918510,0.059046491980553,-0.059867624193430,-0.081894710659981,-0.170342832803726) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.053580965846777,0.222213342785835,-0.158472344279289,-0.166100859642029,0.154638886451721,-0.026977635920048,0.032681334763765,-0.172131359577179,-0.076594486832619,0.027999999001622,-0.075495630502701,0.005489489063621,-0.003904594108462,0.186844423413277,-0.008682889863849,-0.152852490544319) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.173517853021622,-0.129097834229469,-0.191040664911270,0.071253970265388,-0.272147089242935,0.159458234906197,0.144779250025749,0.136466413736343,0.014302136376500,-0.104499474167824,-0.314556986093521,0.060155227780342,-0.505929052829742,0.326043874025345,-0.230858564376831,0.163531899452209) * MODEL3_texOff(vec2(0,0));
res += mat4(0.187395781278610,-0.172688290476799,-0.077609807252884,0.019136739894748,0.219998076558113,-0.183794438838959,0.223926797509193,-0.049426965415478,-0.364654392004013,0.203099817037582,-0.198475286364555,-0.126263007521629,0.069472983479500,-0.328450202941895,0.332462340593338,-0.076738640666008) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.075687207281590,-0.023622792214155,-0.071571633219719,0.174658447504044,0.107675909996033,0.013587875291705,-0.017050337046385,0.001416890881956,-0.017942180857062,-0.047584950923920,0.033101823180914,-0.016197441145778,0.207458972930908,-0.011611977592111,0.096608400344849,-0.081765614449978) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.041615247726440,-0.033484585583210,0.040131900459528,0.119622819125652,-0.154062047600746,-0.009230701252818,0.229738458991051,-0.047536626458168,-0.010204674676061,0.036764204502106,-0.272283464670181,0.002039040671661,-0.003879503114149,0.043658144772053,0.206460297107697,0.094270579516888) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.045520499348640,0.032009083777666,-0.146576166152954,0.088774822652340,0.113825507462025,-0.075008206069469,0.182166710495949,0.033835288137197,-0.113617368042469,0.046203903853893,-0.136318713426590,-0.119734242558479,-0.203214868903160,0.026345971971750,0.031143419444561,0.099525824189186) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.010973995551467,1.125808715820313,-0.041451998054981,-0.085900574922562) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.006212948821485,0.161270469427109,-0.121675789356232,-0.024371463805437);
res += mat4(0.065298646688461,0.010419412516057,0.048936400562525,-0.073974706232548,-0.007220231927931,-0.025903673842549,0.030730543658137,0.130861774086952,0.015122952871025,0.135850563645363,-0.120362155139446,0.056339856237173,0.084587231278419,-0.019738212227821,0.009671984240413,-0.134545952081680) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.040312316268682,-0.123599924147129,0.134819597005844,-0.088717475533485,-0.045587211847305,0.069268710911274,0.084695503115654,-0.017982779070735,0.141727432608604,-0.053010530769825,-0.078845456242561,-0.113164618611336,-0.199037089943886,-0.029194273054600,0.075217358767986,0.095805525779724) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.102847151458263,0.021610615774989,-0.232300549745560,0.071532733738422,0.059852015227079,0.063115805387497,-0.017585014924407,0.002411434659734,0.106188848614693,-0.045571941882372,-0.116763107478619,-0.057589277625084,0.046173211187124,-0.087736472487450,-0.008794293738902,0.025723692029715) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.031566351652145,0.020310506224632,0.101025708019733,-0.022561330348253,0.323910951614380,0.035793032497168,0.086455523967743,0.328509747982025,-0.332572042942047,-0.001707809744403,-0.528882801532745,0.495618253946304,-0.047299709171057,0.174248799681664,-0.193233594298363,0.066305659711361) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.298102736473083,0.173432201147079,0.408151954412460,-0.091637864708900,-0.270680099725723,0.244381189346313,-0.340533286333084,0.238309770822525,0.023114709183574,-0.085826635360718,-0.159593075513840,-0.606712460517883,-0.546391963958740,-0.514577329158783,0.267574608325958,0.293296933174133) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.102267883718014,0.101782366633415,-0.273403763771057,0.256355464458466,-0.055289514362812,-0.186881408095360,0.226546630263329,-0.022067373618484,-0.053727075457573,0.083969540894032,-0.042791873216629,0.202150434255600,0.315517693758011,0.007700835820287,0.053301349282265,-0.041803982108831) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.141492009162903,0.145748242735863,0.009151862002909,0.037177927792072,0.100926704704762,-0.001636133529246,0.150827631354332,0.229400247335434,0.082187697291374,-0.202582716941833,-0.046892095357180,0.092119805514812,0.144638940691948,-0.075726509094238,-0.147929325699806,0.078965857625008) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.240533575415611,0.076451294124126,0.065988734364510,-0.129492595791817,-0.078442394733429,-0.190319135785103,0.064067609608173,0.309792697429657,0.136242866516113,-0.265276908874512,-0.037940874695778,-0.095065861940384,0.086536027491093,0.190800696611404,0.079203508794308,0.036970730870962) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.139510735869408,0.041922949254513,-0.085572116076946,0.044643174856901,0.000978428288363,0.064948938786983,0.059116501361132,0.000030625531508,-0.021688662469387,-0.080971792340279,-0.152945920825005,0.052289921790361,0.154415354132652,-0.077367268502712,0.036649860441685,0.015530622564256) * MODEL1_texOff(vec2(1,1));
res += mat4(0.038613293319941,0.100314013659954,-0.180517211556435,0.040061421692371,0.030495233833790,-0.253750056028366,0.153889775276184,-0.030818033963442,-0.090352885425091,-0.008122993633151,-0.085186421871185,0.070068843662739,0.016315499320626,-0.060810215771198,0.077711366117001,-0.047084569931030) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.011879141442478,-0.031515248119831,0.079556025564671,-0.183468431234360,0.023238804191351,-0.022474562749267,-0.179991587996483,0.212770551443100,0.092731758952141,0.010664392262697,0.043502379208803,-0.059809636324644,-0.130319833755493,0.018259746953845,-0.042920723557472,-0.040153078734875) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.126988500356674,0.003500719554722,0.008221706375480,0.179114878177643,0.066954828798771,-0.052511230111122,0.043336525559425,-0.111457675695419,0.008442784659564,-0.136430665850639,0.078680343925953,-0.075432002544403,-0.117554835975170,-0.037520211189985,-0.189967483282089,-0.026250317692757) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.178518161177635,-0.037418413907290,-0.261779099702835,0.038078594952822,0.161653921008110,-0.017192855477333,0.264578044414520,-0.351943284273148,-0.075698636472225,-0.073601253330708,-0.327392697334290,0.014883352443576,-0.045326977968216,0.023012546822429,0.138756260275841,-0.168219149112701) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.182316288352013,-0.012597923167050,0.380838364362717,-0.269933074712753,0.126393377780914,-0.161639258265495,-0.459321796894073,0.288284063339233,0.184789106249809,-0.178750738501549,0.217569902539253,-0.183006048202515,-0.125522583723068,-0.067637838423252,-0.070200130343437,-0.496908247470856) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.089818261563778,0.181710556149483,-0.165125757455826,0.231417834758759,0.192796364426613,-0.066397316753864,0.206713885068893,-0.288118064403534,-0.061855498701334,0.069121524691582,-0.099810674786568,0.020606396719813,0.001491904491559,0.199668526649475,-0.291028290987015,0.341294169425964) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.049301289021969,0.059307023882866,-0.193933993577957,0.009072942659259,0.059542097151279,-0.023980176076293,0.021560031920671,-0.122852504253387,0.121077932417393,0.080069459974766,-0.095130413770676,-0.078125238418579,0.158060550689697,0.083494298160076,0.001664781593718,-0.047530546784401) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.153635829687119,0.051112893968821,0.175674796104431,-0.034240804612637,0.132865130901337,-0.034419938921928,-0.137104287743568,0.054351709783077,0.074656620621681,-0.274040699005127,0.070094197988510,-0.056488756090403,0.060894321650267,0.053428359329700,-0.141155347228050,-0.248208746314049) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.100154228508472,-0.044006306678057,-0.039035879075527,0.119928784668446,0.056116368621588,0.064117863774300,0.119067557156086,0.016101447865367,0.004041149280965,-0.103801459074020,-0.101177744567394,0.089132361114025,0.054066367447376,-0.158217027783394,-0.119811981916428,0.078056752681732) * MODEL2_texOff(vec2(1,1));
res += mat4(0.113465875387192,0.018893172964454,0.215118885040283,-0.134907141327858,0.007766645867378,0.039256166666746,-0.008988967165351,0.052642550319433,-0.029280418530107,0.046163421124220,0.089359521865845,-0.051669865846634,-0.116910815238953,0.089592352509499,-0.131664246320724,0.071854792535305) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.011554191820323,0.068800210952759,-0.339666187763214,0.167229950428009,-0.042717222124338,0.002385849365965,0.038693357259035,0.051163695752621,-0.001142643974163,0.018257725983858,-0.105011329054832,0.171110108494759,0.135067433118820,-0.066612705588341,-0.147809535264969,-0.183450177311897) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.096515782177448,0.056320674717426,0.210266783833504,-0.201332613825798,0.003718286519870,0.020919073373079,-0.010552579537034,0.020105510950089,0.043417710810900,-0.120268501341343,0.151968568563461,0.009663231670856,0.041855685412884,0.152605772018433,-0.047955293208361,-0.035676553845406) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.142899945378304,0.196509271860123,-0.169899329543114,-0.003237827681005,-0.082420453429222,0.101899556815624,-0.048291966319084,0.137962415814400,0.004633085336536,-0.000821280642413,-0.036837235093117,-0.092964418232441,0.019160859286785,-0.096314206719398,-0.093625180423260,0.118215769529343) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.043164677917957,-0.236447215080261,0.009126788936555,0.041955627501011,-0.028802139684558,-0.150954991579056,0.332372277975082,0.011955847963691,-0.043078750371933,-0.116236768662930,-0.111877813935280,0.277967572212219,-0.221141114830971,-0.033513512462378,-0.165806889533997,0.041323989629745) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.041173554956913,0.014200469478965,0.018198238685727,-0.119764387607574,0.196122005581856,-0.318252950906754,0.331639260053635,-0.116457968950272,-0.008990798145533,-0.040018629282713,0.299953013658524,-0.175045534968376,0.039376489818096,-0.069227859377861,0.231159731745720,-0.186362326145172) * MODEL3_texOff(vec2(0,1));
res += mat4(0.052781991660595,0.095768518745899,-0.166433557868004,0.257479041814804,-0.051481243222952,-0.062862679362297,-0.098182544112206,0.152569174766541,-0.021687848493457,-0.029334753751755,-0.205948323011398,0.022674553096294,0.142088666558266,0.048739623278379,0.094228826463223,-0.088001653552055) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.160303741693497,0.078075140714645,0.127045601606369,-0.194529071450233,-0.114805445075035,-0.000087032341980,0.177686691284180,-0.042603820562363,0.078990183770657,0.040210187435150,0.176797151565552,-0.075013697147369,0.080184303224087,-0.078508228063583,-0.248127311468124,0.107761755585670) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.078383266925812,0.126820459961891,-0.229640483856201,0.103651791810989,0.127914741635323,0.112014107406139,0.203168600797653,-0.122511290013790,-0.018967837095261,0.025756156072021,-0.068391479551792,0.096724353730679,-0.024829564616084,0.105223082005978,0.028768951073289,-0.054428275674582) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(1.065149307250977,2.504436969757080,-0.022964768111706,-0.007134946528822) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE SUBCONV1
//!DESC [AiUpscale_Fast_2x_Photo_RT] sup-pixel convolution 1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.000552503974177,0.001137561281212,-0.001427366398275,-0.000318589096423);
res += mat4(-0.005043918266892,0.001124761998653,0.007935019209981,0.002052685944363,-0.007975446991622,0.009349079802632,-0.004732864443213,0.005795121192932,0.000803675444331,-0.005180526990443,0.000238582812017,0.001100280787796,0.023452529683709,-0.005836273543537,-0.018370432779193,-0.003724745474756) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.005235593300313,-0.017574261873960,0.008260884322226,0.012934689410031,-0.033506531268358,-0.020483525469899,0.041460514068604,0.015903860330582,-0.008888254873455,0.009866133332253,-0.001600046991371,-0.002882611937821,0.001608823542483,0.050990615040064,-0.000664914958179,-0.022549031302333) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.002859495347366,0.001438594656065,-0.002043119166046,-0.000531918951310,0.010684983804822,-0.018001819029450,-0.000961407669820,0.014891986735165,0.005286287982017,-0.001206200453453,0.000488242600113,0.000001990480996,0.009360149502754,-0.006088837981224,0.002094396390021,0.007995032705367) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.010474254377186,0.001434440026060,-0.012114642187953,0.002356635872275,0.006517518777400,0.001638261950575,-0.004854778293520,0.001120848581195,0.000879592320416,-0.007281891070306,0.000823395501357,-0.010964289307594,-0.009958103299141,0.008011120371521,0.015155022032559,-0.013450344093144) * MODEL4_texOff(vec2(0,-1));
res += mat4(0.002506298711523,0.021467480808496,0.008768637664616,-0.017013510689139,0.020475694909692,0.028077865019441,-0.046893842518330,-0.002824110910296,-0.024959560483694,0.021403167396784,-0.024419667199254,0.028115697205067,0.042865473777056,-0.016594454646111,-0.051631417125463,-0.009261468425393) * MODEL4_texOff(vec2(0,0));
res += mat4(0.004796041641384,-0.006496459245682,-0.001021164585836,0.005235235672444,0.014736636541784,0.003876890055835,0.018313853070140,-0.027923053130507,0.009158678352833,0.000708542007487,0.007438890170306,0.000717404880561,-0.005460936576128,0.027774402871728,0.001838832627982,-0.016825508326292) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.003630155464634,-0.003957034088671,0.004123543854803,-0.003872579894960,-0.000670743931551,0.001289133797400,-0.002976765856147,0.003680577268824,0.000279408821370,-0.000328727037413,0.001557648065500,-0.002123600803316,0.000336891709594,0.007260907907039,-0.006435386836529,0.001942653208971) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.005002236459404,-0.000414672365878,-0.016042141243815,0.001557657611556,0.003035638714209,0.000986114609987,0.002163576427847,-0.003680789144710,0.002927134511992,0.001583218690939,-0.007956982590258,0.004590535536408,-0.013073096051812,-0.012571891769767,0.017218105494976,0.009420231916010) * MODEL4_texOff(vec2(1,0));
res += mat4(0.001681054010987,0.005406359210610,0.002053550677374,-0.008152063004673,-0.001733971526846,0.000609827577136,-0.006584097631276,-0.006348040420562,0.000241423476837,-0.000265087932348,0.005615816917270,-0.002329572103918,-0.000637865625322,-0.005403960123658,-0.006827877834439,-0.004433115012944) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.003568106098101,-0.007055518217385,0.001659071189351,0.000812376150861,-0.026560464873910,-0.004281577188522,0.021819612011313,0.003908860497177,-0.001747912727296,-0.009262190200388,-0.004483895376325,-0.000331670162268,-0.014099773950875,0.002989494241774,0.002963882638142,0.007526530884206) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.006543728522956,0.020332187414169,-0.006738316733390,-0.011893643997610,0.012758517637849,-0.038223203271627,0.020434105768800,0.044159598648548,-0.012196100316942,0.004200727678835,-0.016122102737427,-0.009604961611331,0.009062875993550,-0.012848293408751,-0.016871882602572,-0.014326546341181) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.007332076784223,-0.006954046897590,-0.000132110406412,0.008107894100249,-0.009334649890661,0.011543089523911,-0.001101077999920,-0.005844865459949,-0.002922141226009,-0.008931015618145,0.000141758355312,-0.007721234112978,-0.000042543433665,0.004084329586476,-0.001100339111872,-0.007431987207383) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.015779338777065,-0.021519906818867,0.004052043426782,-0.019656172022223,0.020412070676684,-0.005143905989826,-0.005056097637862,0.004746716003865,0.008529510349035,-0.020908441394567,0.003187413094565,-0.025392191484571,-0.002301910892129,-0.006035229191184,0.016541210934520,-0.000764722703025) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.062117774039507,0.029631635174155,-0.046170815825462,0.068100042641163,0.033328771591187,0.064248107373714,-0.055316269397736,-0.052421420812607,0.035323511809111,0.061731107532978,0.020261563360691,0.050755910575390,-0.055013161152601,-0.039108056575060,0.031961672008038,0.059736281633377) * MODEL5_texOff(vec2(0,0));
res += mat4(0.006221328862011,0.026429049670696,0.016533359885216,-0.012685993686318,0.000317360914778,0.000279337516986,0.003952743019909,-0.007399933878332,-0.005720742046833,-0.002369442256168,-0.004606668837368,-0.006830242462456,-0.001095884595998,-0.009441540576518,0.007142687216401,0.002471897751093) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.002841804875061,0.000681738893036,0.004859961103648,-0.009003031998873,-0.007768598850816,0.006321873050183,-0.006433712318540,0.001854020403698,-0.010430227965117,-0.000673557515256,-0.002170544816181,-0.006855667103082,0.004330923315138,0.000214034502278,-0.005818399135023,0.003175071673468) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.004575621802360,0.005841892678291,-0.008732352405787,-0.002177277579904,-0.013762776739895,-0.019830746576190,0.013397490605712,-0.002793977037072,-0.015824953094125,-0.013679078780115,0.002605519490317,0.008038035593927,0.012240217067301,0.018910052254796,0.012856382876635,-0.013599344529212) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.006741459481418,-0.009337217546999,-0.006348349153996,0.019888335838914,0.000998641131446,-0.004011458717287,-0.000699215219356,0.008397547528148,-0.007483150344342,-0.011088565923274,-0.008177767507732,-0.007204362656921,-0.002728097606450,-0.003816395998001,-0.005992484278977,0.009606106206775) * MODEL5_texOff(vec2(1,1));
res += mat4(0.006367483176291,0.001758915605024,-0.004483280703425,0.005142317153513,0.004956343211234,-0.002102423692122,0.000470549974125,0.003775169374421,-0.020540181547403,0.012352657504380,0.000694328628015,-0.002653002040461,-0.003367809113115,0.001161429216154,0.000198649489903,-0.003835032926872) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.013642775826156,-0.020365007221699,0.007904537022114,-0.006688744761050,0.004475960973650,0.002370779402554,0.000445783196483,-0.000956034695264,0.001638371497393,0.012357501313090,-0.009680939838290,0.005001741927117,-0.004559688735753,-0.011281982064247,0.011016756296158,0.014283156022429) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.013339860364795,0.010481996461749,-0.002089066663757,0.001910851919092,0.001886777346954,0.006377822253853,-0.001685581286438,-0.001142414635979,0.013666909188032,-0.017101377248764,0.004587165545672,0.006549899000674,0.002210835460573,0.006247608456761,-0.003717562882230,0.000956075266004) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.002581045264378,0.019023260101676,0.019961262121797,0.003318333067000,0.016187023371458,-0.004643205553293,0.022638997063041,-0.002425552345812,0.013792356476188,0.016557563096285,-0.033181127160788,0.029857769608498,-0.010244756937027,0.003562241559848,0.009095407091081,0.001420165994205) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.055969506502151,-0.049185153096914,0.037812571972609,-0.047636423259974,-0.052954923361540,-0.012029500678182,-0.008056018501520,0.001684231683612,0.041465792804956,-0.057739917188883,0.047014117240906,-0.018083168193698,0.037998892366886,0.026692379266024,-0.050879143178463,-0.018115783110261) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.010798988863826,-0.011423924937844,-0.020150685682893,0.008118311874568,0.020291022956371,-0.015706600621343,0.011488802731037,0.010067862458527,-0.025725232437253,0.019629294052720,-0.000584913766943,-0.028570093214512,-0.001729448908009,0.000141680386150,0.009291079826653,-0.015693580731750) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.000394675444113,0.001659220666625,-0.013788272626698,0.015995845198631,0.006457160692662,0.000269203097560,0.006196490954608,-0.005286802072078,-0.003678129287437,-0.007525651250035,0.018838841468096,-0.008505370467901,0.012343503534794,-0.004517260007560,-0.012615639716387,0.013061970472336) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.003331035608426,-0.001726108370349,0.024303577840328,-0.020702321082354,0.009909919463098,0.009199778549373,-0.032584581524134,-0.002160948934034,-0.006178010720760,0.007948546670377,0.001147100585513,-0.018461430445313,-0.040139418095350,-0.010194714181125,0.037671193480492,-0.012121915817261) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.002277306048200,0.003699959488586,-0.003762906184420,-0.007436395622790,0.005534825846553,0.008303415961564,0.014629920944571,-0.011822293512523,-0.001717599807307,-0.000187743396964,-0.018077617511153,0.022484527900815,-0.004599297419190,-0.020558994263411,0.003555174218491,0.027197735384107) * MODEL6_texOff(vec2(1,1));
#elif (SHARP == 1)
vec4 res = vec4(0.001107748830691,0.000770371116232,-0.000870629737619,-0.001030368148349);
res += mat4(-0.002794787986204,0.001855612732470,-0.001801547245122,0.000113790280011,-0.011212901212275,0.002982172882184,0.002685939427465,-0.004472579807043,0.006224575918168,-0.003449182026088,-0.008821171708405,-0.004224753938615,-0.004891125485301,-0.006793721113354,-0.015240704640746,0.001082092639990) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.002541047753766,-0.003760947147384,-0.003534435294569,-0.002660787198693,-0.042843442410231,-0.024929283186793,0.050000153481960,0.032173044979572,-0.041284441947937,0.016502596437931,-0.005982157774270,-0.020006116479635,0.004660920705646,0.022316502407193,-0.009465133771300,-0.026861194521189) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.000736380054150,-0.001121551846154,-0.000212997736526,-0.001923158881254,0.009238824248314,-0.019592342898250,-0.006712816655636,0.016006564721465,0.004033585544676,-0.040105681866407,0.014665907248855,0.024334365502000,0.008735649287701,-0.003282242221758,0.000487596058520,-0.002404957776889) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.001428351737559,-0.005839762743562,-0.001129404176027,0.000326446024701,0.001024579978548,0.001993017969653,-0.001427577924915,0.003429670585319,0.002464225050062,-0.002103455830365,-0.004881432745606,0.001698043779470,-0.024477457627654,-0.003878265619278,0.035841830074787,-0.006558584515005) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.019547354429960,0.013133972883224,0.011225686408579,0.014282258227468,0.039123430848122,0.017040204256773,-0.025493049994111,-0.011648820713162,-0.027548303827643,-0.053739033639431,0.065642140805721,0.027244325727224,-0.010479629971087,-0.062115114182234,-0.013353476300836,0.041472539305687) * MODEL4_texOff(vec2(0,0));
res += mat4(0.012582295574248,-0.015994567424059,0.006275091785938,-0.001507418346591,-0.004501005169004,0.018366456031799,0.001244291546755,-0.010237730108202,0.002865047659725,0.039229005575180,-0.022118682041764,0.007370200008154,-0.018965683877468,0.007051652763039,0.003706388408318,0.001098379492760) * MODEL4_texOff(vec2(0,1));
res += mat4(0.002554156584665,-0.002067944966257,0.002773419488221,-0.006498323753476,-0.003995949868113,0.007091239094734,-0.001760676386766,0.005449696909636,-0.006349062547088,-0.014047463424504,0.016292633488774,-0.011702976189554,0.010904948227108,0.005731580313295,-0.000195119340788,0.009400792419910) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.008686708286405,0.008789653889835,-0.019117930904031,0.006990194320679,-0.012585500255227,-0.013456705026329,0.008676002733409,0.002796415938064,0.028264926746488,0.022634774446487,-0.036182433366776,0.012755546718836,-0.017099784687161,-0.001022265176289,0.042108599096537,0.015209139324725) * MODEL4_texOff(vec2(1,0));
res += mat4(0.001688911113888,0.006368736270815,0.006457049865276,-0.010055241174996,0.000890508585144,-0.007462684530765,-0.002121376805007,-0.001909993356094,-0.003105763113126,0.009173501282930,-0.000948994420469,-0.015138933435082,-0.000635026372038,-0.007745437789708,-0.005769059527665,0.008209602907300) * MODEL4_texOff(vec2(1,1));
res += mat4(0.012853403575718,-0.004538988228887,-0.011736750602722,-0.011432650499046,-0.004532351158559,-0.004409241490066,0.015046018175781,0.005676149856299,0.002590026240796,-0.003937656059861,-0.009392222389579,-0.003985439427197,-0.008284311741590,0.007568619679660,0.011162204667926,0.005790046416223) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.013133043423295,0.013635374605656,-0.004398447927088,-0.006268295459449,0.001748905400746,-0.000036800352973,0.021289277821779,0.022326601669192,0.000283496658085,-0.002294217702001,-0.029525039717555,-0.027673996984959,0.009984641335905,-0.013874071650207,-0.007497556041926,-0.001255029463209) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.020838469266891,0.007284929044545,0.000565817637835,0.000559977896046,-0.002471672371030,0.001360574387945,-0.005671020131558,0.006010151468217,-0.012393168173730,-0.005059133749455,-0.000581439817324,-0.014089323580265,-0.003989144694060,-0.000795905478299,0.001849550870247,0.000692785717547) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.024998074397445,0.012814509682357,0.035994954407215,0.020140299573541,0.026950096711516,0.001289290376008,-0.025686142966151,-0.005286160856485,0.032239757478237,-0.002111646113917,0.016021825373173,-0.001758635859005,0.048677992075682,0.002153877168894,-0.023707205429673,-0.016558960080147) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.043408393859863,-0.018411828204989,-0.043413557112217,0.005988034885377,0.039944928139448,0.059482622891665,-0.045719079673290,-0.055076807737350,0.028907706961036,0.030795993283391,0.015576099976897,0.014912402257323,-0.031324829906225,0.016273256391287,0.016971630975604,0.025029797106981) * MODEL5_texOff(vec2(0,0));
res += mat4(0.025845035910606,-0.007386418990791,0.032917443662882,-0.011248018592596,0.004992042202502,0.009000807069242,0.003321700030938,-0.009946811944246,-0.002482408657670,0.020165719091892,-0.014713323675096,0.003614059649408,0.010154284536839,0.015871493145823,0.003010737476870,-0.010709958150983) * MODEL5_texOff(vec2(0,1));
res += mat4(0.003913415595889,-0.007530274800956,0.009819651022553,-0.012377413921058,-0.014865793287754,-0.003302249126136,0.001448714407161,-0.003913044929504,-0.010829799808562,-0.000482717354316,0.013889448717237,-0.002534780418500,-0.005777741782367,0.006843789946288,-0.020070573315024,0.002250181278214) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.004314332269132,0.005681517533958,-0.017264720052481,-0.005443780682981,-0.018041789531708,-0.023558001965284,-0.008357109501958,0.007075867615640,-0.030364593490958,-0.031285561621189,0.016997966915369,0.017610002309084,0.037492383271456,0.018290037289262,-0.001860279357061,-0.065279901027679) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.010342841967940,-0.001872603548691,0.005778647493571,0.009560892358422,-0.000236370295170,-0.004649268928915,0.006414794828743,-0.001323591801338,0.005104010924697,-0.009418604895473,-0.006753221154213,0.001700816443190,-0.006005600094795,-0.005311163607985,-0.022034449502826,0.013660019263625) * MODEL5_texOff(vec2(1,1));
res += mat4(0.011537500657141,0.003021996002644,0.011233051307499,0.001367894583382,-0.007837112993002,0.004754654597491,0.003395377192646,0.003750931471586,-0.001305569079705,0.009076100774109,-0.004179209005088,0.002923589898273,0.005289374850690,-0.009456339292228,0.003304552286863,0.000113362315460) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.002061680657789,0.005502348765731,0.015587541274726,0.018513092771173,0.011445953510702,-0.005113053601235,-0.006558461114764,0.001071715028957,0.011635414324701,-0.019248247146606,-0.001725103706121,-0.002368371933699,-0.024368228390813,0.015000517480075,0.004192636813968,-0.005555924959481) * MODEL6_texOff(vec2(-1,0));
res += mat4(0.002289209514856,0.008802320808172,0.000181317955139,0.006916555110365,-0.007656046655029,-0.004835724830627,0.004467084072530,-0.001483020721935,-0.011194856837392,0.001994686201215,0.001037814188749,0.006272867787629,0.005998004227877,0.007239226251841,-0.002608435228467,0.001177253318019) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.006631795782596,0.017864268273115,-0.002254486083984,0.015426056459546,0.016803609207273,-0.012234920635819,-0.001862380304374,-0.001324126496911,0.010484482161701,0.020823316648602,0.009552188217640,0.015892237424850,-0.003549224697053,-0.021969836205244,0.003337793983519,-0.021690560504794) * MODEL6_texOff(vec2(0,-1));
res += mat4(-0.017277371138334,-0.057508070021868,-0.033516749739647,-0.056991092860699,-0.022500377148390,0.006131049711257,0.016500173136592,-0.018824432045221,0.048562958836555,-0.049494359642267,0.050309810787439,-0.049895517528057,-0.049178104847670,0.041083656251431,-0.063383847475052,0.051490720361471) * MODEL6_texOff(vec2(0,0));
res += mat4(0.010456648655236,0.031288273632526,0.010828036814928,0.018695741891861,-0.001418650266714,0.009163069538772,-0.011765736155212,0.017191048711538,-0.018555723130703,-0.003366903169081,-0.020891075953841,-0.002352320589125,0.014307742938399,0.015266241505742,0.014115364290774,0.016046371310949) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.002224220195785,-0.002055943012238,-0.005822075065225,-0.000197642453713,-0.008036395534873,-0.004011867102236,0.006521681789309,-0.008594949729741,-0.004356096964329,-0.001826957217418,-0.000345524487784,0.012070659548044,0.003500816645101,0.002895409474149,-0.000133106965222,-0.007677603978664) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.002129859989509,0.003051992738619,0.008220185525715,-0.009536216035485,-0.001107593066990,-0.003334084991366,-0.009345341473818,0.023870563134551,0.003157297149301,-0.001921163056977,0.016905665397644,-0.017303636297584,0.003203607862815,-0.005422857124358,-0.007295931689441,0.006609350908548) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.008877192623913,-0.007901802659035,-0.002857226179913,0.010747431777418,0.007660783361644,0.001957127358764,0.004227998200804,-0.006886814720929,-0.002221098169684,0.003668421646580,-0.010612695477903,0.000514131854288,-0.003882492659613,-0.004912608303130,0.005586323793977,0.002146568614990) * MODEL6_texOff(vec2(1,1));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 1.200 * > OUTPUT.h LUMA.h 1.200 * > *
//!WIDTH LUMA.w 2 *
//!HEIGHT LUMA.h 2 *
//!BIND SUBCONV1
//!BIND LANCZOS3
//!DESC [AiUpscale_Fast_2x_Photo_RT] depth to space

vec4 hook()
{
vec2 fcoord = fract(SUBCONV1_pos * SUBCONV1_size);
vec2 base = SUBCONV1_pos + (vec2(0.5) - fcoord) * SUBCONV1_pt;
ivec2 index = ivec2(fcoord * vec2(2));
vec4 res = SUBCONV1_tex(base);
return vec4(res[index.x * 2 + index.y] + float(LANCZOS3_texOff(0)), 0, 0, 1);
}
